User Stories - Apex Test Results

Updated 3 weeks ago by Copado Solutions

When Apex code is added to a user story, the checkbox Has Apex Code will be automatically checked.

  • You can set the Minimum Apex Code Coverage for the user story. If the value is lower than the value set in the environment of the user story, the environment's value will be applied automatically.
  • The updated user story coverage will be shown when you go back to the user story layout by clicking on Go Back.
  • As of Copado v12, Apex Test Result section is removed from layout and Apex Test new custom button is created. If Apex code is added to a User Story, the Manage Apex Tests button can be clicked. This will open the Apex Test Page for that User Story and you can calculate the Apex code coverage for that User Story by clicking on the Run Apex Tests button.

  • The Apex test fields are available to provide more information about the results:
    • Number of failing methods.
    • Number of classes without the minimum coverage required.
    • Number of triggers without the minimum coverage required.

With these Apex test fields, better quality gates can be set in order to prevent failing promotions, and they will help you create validations in these fields so that you can increase the success rate of your user story promotions.

When updating from Copado 8.8 & under you will need to follow the upgrade instructions in our release notes.

Adding Test-Only Classes

As of v11, it is possible to add add test-only classes to your user story. Thanks to a new button labeled Add Test Classes, a new pop-up page will open that will allow you to select apex classes through a grid that contains only test classes. These classes will have the Test Only column checked and will help you improve your user story's Apex code coverage.

How did we do?