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 is passed from a data file to the automation scripts instead of hardcoding the data directly in the automation scripts. Therefore, one data file exists for every test script. Use a data file to test an aspect of your storefront with many different sets of data with a single automation script. The name of the XML data file must be identical to the test script. The framework automatically selects the data file based on the test script name.

Parameter types
Environment parameters
Since each automation script has its own data file, the test cases within an automation script can globally use any defined environment parameter.
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 functions of the store 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 is passed as an output parameter that validates the test case. The output validation parameters for a test case are contained in the same data block as its input parameters.

Before you begin

  • Imported Aurora-Tests into your development environment. For more information, see Importing a test bucket project.
  • Review the data files in the Aurora-Tests test bucket project and use their contents as a guide to write your new data file.

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.