Table of Contents

Setting up and cleaning the context for a scenario test


Only available versions of this content are shown in the dropdown

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:

  1. Record a scenario test using static data. See Creating scenario tests for more information.

  2. In the navigation page of Dev Studio click Configure Application Quality Automated Testing Scenario Testing Test Cases .

  3. Select the test case for which you want to edit.

  4. Navigate to the Setup & Cleanup tab of the test case.

  5. 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.

  6. Input a name for the activity.

  7. 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 OperatorID.pyFirstName+OperatorID.pyLastName"" dynamic data structure.

  8. To utilize this dynamic field in your test case, navigate back to your scenario test case.

  9. From the Test case steps section, select the step that contains the text field.

  10. After selecting the test case step, navigate to the Actions field, and change the value type to Dynamic.

  11. In the Value field, enter the value created as part of your activity in Step 8. In this case, it is PersonPage.pyLabel.

  12. Click Save.

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.

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.