User Stories - Apex Test Results

Updated 4 days 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.
  • The Apex Test Result section was removed from the layout and there is an Apex test custom button. If you add Apex code to a user story, you can click on the Manage Apex Tests button. This will open the Apex Class Test page for that user story where you can calculate the user story's Apex code coverage 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 will open and you will be able to 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 in the user story.

How did we do?