This article covers the high level capabilities, best practices and known limitations of Pega Scenario testing framework of the Pega platform. The documentation covers information about Scenario Testing feature to learn more about it.
Pega Scenario testing allows Pega application users to create UI based end to end scenarios to test a Pega application. It has the following capabilities.
Record tests by simply running the application - Creating a test case is as simple as running the end user application. User input will be captured as the test data that will be used for subsequent test runs
Support for all out of the box UI controls - All all the platform supplied UI controls are directly supported without any additional configuration
Easy to read steps - The test case features simple easy to read steps that can be understood by all stakeholders as it simply describes all the necessary steps in the scenario.
Simple validations - The validations are simple direct comparators of actual versus expected values.
Support for dynamic test data - Dynamic data can be supported for used for the expected user input value, or for the expected output value. Dynamic data can be specified through a predefined data page, D_pyScenarioTestData.
Test case-types and end user portals - Test cases can be created for individual case-type and for any end user portal.
Setup and clean-up - Ability to setup test data for the test to run independently and clean-up at the end of the test case.
Configure execution delay - Configure step level delays at test case level and for all steps of all test cases in the application from application quality settings page.
Creating Pega Scenario tests
Pega Scenario tests can only effectively be captured in the context of the application portal. Pega Scenario tests cannot be recorded from Dev Studio, App Studio or any of the development portals. However there are a few additional things to keep in mind.
Tests can only be captured through the Test recorder which is access through the run-time toolbar.
The Create test case button allows you to create either a Portal or a Casetype test.
Portal level test allow for capturing user actions from the header and footer, left side menu and other navigation elements
Case level tests captures all the user interactions starting from the new screen for the casetype. All interactions outside of case will be ignored.
After selecting the type of test, an orange selector will show up on hover over any supported UI control.
Test case steps are captured on every user interaction with that has the orange selector.
Add explicit validations by clicking on the "+" within the orange selector. An overlay will be displayed with options for additional assertions.
Once the recording is done click on Stop and Save to create the test case.
Running Pega Scenario tests from Deployment Manager
Running scenario tests from Deployment Manager requires the use of a Selenium runner. There are various test services out there such as CrossBrowserTesting, BrowserStack or SauceLabs. You can also use a stand alone Selenium runner such as Selenium server or Selenium Grid.
Working with Pega Scenario testing component on market place
With Pega platform 8.5, Pega Scenario testing feature has been decoupled from the native Pega platform and was released as an independent component. Please refer to the following link to understand how to install the component and the features released as part of this component.
This component is compatible with all 8.5 and later Pega platform versions.