
Scenario testing
Industry best practices for test automation
Industry best practices for test automation is graphically shown as an Ideal Test Pyramid. Test types at the bottom of the pyramid, such as unit testing, are the least expensive to run, easiest to maintain, take the least amount of time to run, and usually represent the greatest number of tests in the test suite. Test types at the top of the pyramid, such as scenario testing, are the most expensive to run, hardest to maintain, take the most time to run, and should represent the least number of tests in the test suite. The higher up the pyramid you go, the higher the overall cost and the lower the benefits.
User interface-based functional and scenario tests
Use UI-based functional tests and end-to-end scenario tests to verify that end-to-end cases work as expected. The UI-based scenario testing tool allows developers to focus on creating functional and useful tests for single-page applications (SPAs) rather than writing complex code.
You can provide data to your test cases with a predefined data page. The data page provides unique values for each execution of the test case. You can populate the data page using any source, including activities or data transforms.
Tests are saved in a test ruleset. Once saved, tests are available on the Application: Scenario Testing landing page. From the landing page, you can run a test or view the results of a previous test.
Scenario testing a feature on Pega Platform
Scenario testing allows you to create UI based end-to-end scenarios to test your application. You cannot record a scenario from Dev Studio, App Studio, or any of the development portals. Scenario tests are captured in the context of the application portal only, such as the User Portal or a similar application portal. You use the on the runtime toolbar to create or modify a scenario test.
You can test either a specific case type or an entire portal.
An orange highlight indicates any supported user interface element that can be tested when you use the test recorder and hover over a testable element. Interactions are recorded in a visual series of steps, and the execution of a test step can include a delay.
Note: Running scenario tests from Deployment Manager requires the use of a Selenium runner. For more information, refer to the Deployment Manager help on running Scenario Tasks. You can also run scenario tests from other pipeline tools using the associated Pega API. For more information, refer to the Pega RESTful API for remote execution of scenario tests discussion post.
In the following image, click the + icons to learn more about the Automation Recorder capabilities.
If you are having problems with your training, please review the Pega Academy Support FAQs.
Want to help us improve this content?