Setting up and cleaning the context for a scenario test
Scenario tests can now apply dynamic data to text fields for real-time application of information in a UI recording.
After an initial scenario test case has been recorded, any static text field can now be re-characterized as a dynamic field to apply referenced data using the editable scenario test case dashboard. A new Setup & Cleanup tab has been added to the scenario test case dashboard to set up dynamic data. To perform this action:
Result: To automatically remove all referenced data pages, data
objects, and user pages at the end of each test run, select the checkbox for
Clean up the test data at the end of run.
- Record a scenario test using static data. See Creating scenario tests for more information.
- In the navigation page of Dev Studio click .
- Select the test case for which you want to edit.
- Navigate to the Setup & Cleanup tab of the test case.
- In the Setup section of this tab, you can create or fetch test data using one of the setup options available from the drop down menu. You can apply a data transform, execute an activity, or load an object. Scenario tests can fetch and use any of this setup information as dynamic input data.
- Input a name for the activity.
- On the setupDynamicData page, create the dynamic value and associate it to a
property for use in your scenario test case. For instance, on the
PersonPage in the example below, the
.pyLabel property consists of the
dynamic data structure.
- To utilize this dynamic field in your test case, navigate back to your scenario test case.
- From the Test case steps section, select the step that contains the text field.
- After selecting the test case step, navigate to the Actions field, and change the value type to Dynamic.
- In the Value field, enter the page.property value created as part of your
activity in Step 8. In this case, it is PersonPage.pyLabel.
- Click Save.
Previous topic Anypicker and Multi-select support in scenario testing Next topic Pega Test Automation Kit 1.1