Discussion

High level overview of test coverage using PegaUnits

Test Coverage is a feature to improve the quality of your application and identify how many executable rules in your application are covered by tests, be it UI manual tests, PegaUnits , Scenario Tests or other UI based automation tests.

More information on Test Coverage feature can be found in the link below:

https://community.pega.com/sites/default/files/help_v83/procomhelpmain.htm#/express/basics/v6portal/landingpages/application/applicationrulecoverage.htm

If one wants to get the coverage of just the PegaUnits, this article explains how to get it.

Step 1: Start the coverage

Click on Configure->Application->Quality->Test Coverage

One would be redirected to the application coverage landing page

Once landed, we can find a button to start the application coverage, click on "Start new session", provide the description of the coverage and click "ok" to start application coverage.

Note: User should have privilege "pzStartOrStopMasterAppRuleCoverage" to run the coverage.

Step 2: Run PegaUnits

Go to PegaUnits landing page and run the PegaUnits.

Go to Configure->Application->Quality->Automated testing->Unit testing->Test cases

We will be redirected to the PegaUnits landing page, try to select the PegaUnits and run them.

Once we select all PegaUnits in first page, link will be shown to select all PegaUnits in all the pages. Click on the "Select all "XX" tests in the application".

Note: List of PegaUnits shown here are based on the list of applications selected at "Application Quality Setting". You can see Application Quality settings at Configure->Application->Quality->Settings.

Below is the screen shot we can expect to see

Step 3: Stop the Coverage

After running the PegaUnits, go to the coverage landing page again and stop the coverage.

Configure->Application->Quality->Test Coverage.

Click on "Stop Coverage" in the landing page header.

Once the coverage is stopped, a coverage report will be generated, and it will be shown in the list of coverage records.

Below is the screen shot we can expect to see

Step 4: Check the coverage percentage

We can check the coverage recorded for running PegaUnits and we can also click on “Show report” to see the details of coverage report, like the rules covered, uncovered and other details of coverage session including logged in user’s name that performed coverage.

Note: List of rules considered for the coverage session are based on "Application Quality Settings".

Below is the screen we can expect to see

Comments

Keep up to date on this post and subscribe to comments

November 26, 2019 - 6:19am

Thank you @RajeshVenkata ! 

Vidyaranjan | Community Moderator | Pegasystems Inc.