Testing Pega Platform applications
1 Task
30 mins
Scenario
In the Travel Management Customer Support application, Partner Onboarding relies on the Partner Profile list returned by the D_PartnerProfileList Data Page. Users intermittently report that the list sometimes returns incomplete data. Stakeholders also require that the list loads quickly to avoid delays in onboarding work.
To meet these requirements, you must complete the following tasks:
- Create unit tests for
D_PartnerProfileListto confirm that the Data Page returns the expected results. - Validate that the execution time remains within the performance threshold of less than or equal to 200 milliseconds.
- Run a Test Coverage session that uses the unit tests, and review the results.
The following table provides the credentials you may need to complete the challenge:
| Role | User name | Password |
|---|---|---|
| Solution Builder | [email protected] | pega123! |
After completing this challenge, you should be able to:
- Create unit tests by using the Pega unit framework for a list Data Page.
- Add assertions for runtime and returned data correctness.
- Run a Test Coverage session and analyze the results by using Application Quality tools.
Detailed Tasks
1 Test Pega Platform applications
Use the technical documentation linked in the Doc Journey above to complete the assigned tasks. The technical documentation might have more information than you need to complete the tasks.
Acceptance criteria
- Two unit tests exist for the
D_PartnerProfileListData Page. - Both unit tests assert that the runtime is less than or equal to 200 milliseconds (0.2 seconds).
- Unit Test 1, First Result in List returns named Partner Profile, asserts that
pxResults(1)has the following values:- PropertyName = Marriott Courtyard
- AvailableRooms = 92
- MaintenanceStatus = Satisfactory
- Unit Test 2, Partner Profile List count is 5, asserts that the
.pxResultscount is 5. - All unit tests are saved to the application's testing ruleset:
TMCSTest. - Unit tests run successfully via Application Quality Test Coverage.
Directions
- In the Partner Profile data type, go to the Usage tab and open
D_PartnerProfileList. - Run the Data Page, and then use to create unit tests and add the assertions as detailed in the Acceptance criteria.
- Configure an Application Quality Test Coverage session that uses the unit tests you created for the
D_PartnerProfileListData Page. - With the Test Coverage session running, go to Configure > Application > Quality > Automated Testing > Unit Testing > Test Cases to display the unit tests you created.
- Run the unit tests as part of the Test Coverage session, and then view the results.
Available in the following mission:
Want to help us improve this content?