Introduced in Feature Pack 1

Creating a data file

A data file is an XML document that contains three separate sections, each of which represents a different type of parameter. Test data should be passed from a data file to the automation scripts instead of hardcoding the data directly in the automation scripts. Therefore, one data file should exist for every test script. Using a data file will allow you to test an aspect of your storefront with many different sets of data while only having to write a single automation script to do so. The name of the XML data file should be identical to the test script. The framework automatically selects the data file based on the test script name.

The three types of parameters include:
Environment parameters
Since each automation script has its own data file, the test cases within an automation script can globally use any environment parameter that has been defined.
Input parameters
At the start of every test case, the automation script calls the setDataLocation method to specify the test node and data block that contains the input parameters. The parameters include any values that are needed to test the storefront. For example, the test cases that verify the sign-in functionality of the store will reference a corresponding test node and two different data blocks; one data block to test a successful sign-in and another to test a failed sign-in.
Output parameters
When a test case has an expected result, such as displaying a specific message, the result should be passed as an output parameter that validates the test case. The output validation parameters for a test case should be contained in the same data block as its input parameters.

Before you begin

Review the data files in the test bucket project and use their contents as a guide to write your new data file. If you have not imported into your development environment, follow the steps in tsmimportingtestbucket_dup.html.

Procedure

  1. In the development environment, browse to the src directory in your test bucket project and right-click the data directory.
  2. Click New > File.
  3. In the File name field, type the name of the automation script.
    For example testscripta.xml.
  4. Click Finish.