The Application: Unit testing landing page
The Pega unit framework provides a landing page to manage all unit testing artifacts created using this framework. The Application: Unit testing landing page is accessible from the Configure menu in the header of Dev Studio.
The following image shows the Application: Unit testing landing page that consists of three tabs to manage respective artifacts:
Test cases tab
Users can perform the following activities from the Test cases tab.
- View all test cases authored for the application: Users can view all the test cases that are created for the application along with the latest test results.
- Open and view the details of any test case: Users can click on the name of any test case to open the rule form of the test case. The rule form contains details about the test.
- Filter test cases using various filters: Users can filter test cases based on any particular rule type, rule name, class, and other fields.
The following figure displays the "Rule type" filter option that is available to users on the test cases tab:
For example, when users select the Data Page and When checkboxes in the filter, all test cases that are created for these two rule types are displayed.
The Application: Unit testing landing page provides an advanced filter option to apply additional filters to select specific operators. Users can also set the duration in which test cases are created or updated, as in the following figure:
-
Select and run a set of test cases depending on the requirement: Users can run either all or a subset of the total test cases from the landing page. Users can filter test cases with the required criteria, select all the filtered test cases, and then run them by clicking
, as shown in the following image.
- View test result of a test case: In the Result column, users can click the Passed or Failed label next to a test case to view the test results.
- View run history of a test case: in the Run history column, users can click the View next to any test case to view the results of the previous runs of the test case. Users can open any of the previous runs to view more details about that run.
The following image shows the Test Runs Log window of a test case with the date, time stamp, and the test result when users click View in the Run history column.
- Export test cases along with results: On the Application: Unit testing landing page, users can click the button to export all the test cases along with their results to an Excel file for reference or for any other documentation purpose.
Note: The Export to Excel feature does not honor filters and exports all the data.
-
Create a test suite with selected test cases: On the Application: Unit testing landing page, users can filter the required test cases and click the button to create a new test suite comprising of selected test cases.
Test suites tab
On the Test suites tab, users can manage test suites for their applications.
Users can perform the following activities from the Test suites tab on the Application: Unit testing landing page:
- View all test suites: Users can view all the test suites created for the application, on the landing page.
- Open and view the details of any test suite: Users can click on any Test suite name to open the Test suite Rule form. This Rule form contains all the details of the Test suite.
- Filter test suites using various filters: Users can filter test suites based on the Test suite name, ID, Category, Result, and other fields.
- Create a new test suite: Users can create a new test suite and add test cases to it.
- Select and run a set of Test suites depending on the requirement: User can run either all or a subset of the total test suites from this tab. Users can filter the Test suites with the required criteria, select all the filtered test suites, and run them.
- View test result of a test suite: Users can click the Passed or Failed label, next to a test suite, to view the Test suite results.
- View Run history of a test suite: Users can click the View (link) for any Test suite, to view the results of the previous runs of the Test suite. Users can open any of the previous runs for more details about that run.
Reports tab
Users can view the following two key metrics related to the unit test cases of the application on the Reports tab.
- Test compliance for supported rule types: This metric displays the number of unit test cases created for each PegaUnit-supported rule type. From this metric, users can identify rules which do not have unit tests associated with them. These rules are listed in the Without test cases column.
The following figure shows the number of Total rules for each supported rule type along with the count of rules with and without test cases.
Users can click on any number shown in the metric to view the list of rules and work on them.
- Test execution summary: This metric provides the Test execution summary information of all the test cases in the application. The results that are displayed in this metric are from the most recent test execution. Users can identify failed test cases from this metric and analyze them.
The following image shows the Test execution summary of an application. The execution statistics are displayed for each Pega unit-supported rule type. Users can click on any number to view the list of rules.
This Topic is available in the following Module:
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?