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 is 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 value of the environment will be applied automatically.
  • The updated user story coverage is shown when you go back to the user story layout by clicking on Go Back.
  • If you add Apex code to a user story, you can then click on the Manage Apex Tests button. This will open the Apex Class Test page for that user story where you can calculate the Apex code coverage of the user story by clicking on Run Apex Tests:

  • 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.

Adding Test-Only Classes

You can also add test-only classes to a user story with the button Add Test Classes. When clicking on this button, a new pop-up page opens and you can select Apex classes from a grid that contains only test classes. These classes will have the Test Only column checked and will help you improve the Apex code coverage on the user story:


How did we do?