Skip to main content

Anatomy of a Pega scenario test

The Pega scenario testing framework helps users create UI-based end-to-end functional tests without writing a script or code. This framework works on the record and playback mechanism. Users can run test cases made by using this framework manually or in an automated fashion by using a test suite or from a Continuous Integration (CI) pipeline.

Your Pega application consists of various case types and interaction portals. Pega scenario testing helps verify the end-to-end functionality of each case type and interactive flows of your Pega application.

With the Pega scenario testing framework, you can create the two following types of scenario tests:

  • Case type test: You can create an end-to-end functional test for a specific case type of your Pega application.
  • Portal test: You can create an end-to-end functional test for a specific interaction flow of your Pega application. 

The main difference between a Case type and a Portal test case is that the scenario test case of a case type is tightly associated with the flow of the case type. The scenario test case for a portal is related to any action that you perform on the portal.

As a best practice, before creating a scenario test case, you must create unique data-test-ids for all UI components that you want to record as part of the flow. Applications that are created post 8.1 version of your Pega application using out-of-the-box components have the unique data-test-ids generated by default.

The scenario testing framework supports more than 40 UI controls, and an orange highlight box is displayed for the supported controls when you hover over any control while recording a test case. 

The end-to-end functional testing of your Pega application involves the following actions: 

  • Creating scenario test cases for each case type and each interaction portal.
  • Logically grouping multiple test cases into test suites.
  • Running tests regularly.
  • Verifying results and taking corrective actions.

As a best practice, limit the use of application tests that are end-to-end functional tests to reduce maintenance overhead and make debugging easier when you encounter errors. You must ensure that a significant portion of application tests are unit tests.

The process flow of a scenario test case is similar to that of a Pega unit test case. For more information, see Anatomy of a Pega unit test.  

Check your knowledge with the following interactions:

This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice