The Apex Code Coverage report calculates code coverage for any group of slected apex tests. The report is color coded to show low, medium and high coverage levels. This is useful for Org monitoring and technical debt reduction. This interface is available by right clicking an item on the desktop and also from the Options Menu.
Video
The Metazoa Snapshot Apex Code Coverage Report provides a comprehensive view of all the Apex tests. It allows users to select, run tests, and view the coverage locations, including other classes covered. This report tool offers options for selective test running, detailed results, customizable coverage standards, and scheduling for report generation.
Accessing the Report
- On the Apex Code Coverage Report interface, all Apex tests will be listed down the left-hand side of the screen.
- Click on any test to run it immediately.
Running Specific Tests
- Select the group of tests that you're interested in.
- Click on the 'Display the Report' button.
- The system will then run only the selected section of tests and display the Apex classes being tested and the code coverage on those classes as a group.
Setting Coverage Standards
- You can set your own coverage standards.
- Define the level of coverage you're interested in. For example, you might decide that a test should only pass if it achieves 80% coverage or above.
- Coverage below 80% but above 60% could be marked in yellow, and anything below 60% could be marked in red.
- This will redefine the color coding of your tests according to your standards.
Checking Detailed Code Coverage
- Go to the 'Code Coverage' tab.
- Here, you can see all the test results in detail, including the lines that need to be covered by your test class and the percentage of coverage achieved.
- In case of lower coverage, you can identify why a certain test is only achieving, say, 33% coverage.
Scheduling the Report
- The Snapshot Apex Code Coverage Report can be scheduled as per your convenience.
- You can specify that whenever there's a new snapshot, the system should send the report out as a PDF in an email to the designated analyst.
- The system will email out the results only if there's a problem, for example, if medium or low coverage is reported.
- This is especially helpful if you're interested in a section of Apex code that needs to be tested every night.
The Metazoa Snapshot Apex Code Coverage Report is a powerful tool that helps keep track of Apex code coverage in your projects and ensures all important sections of your code are adequately tested.