Skip to content

How to reference test data?

Reik edited this page May 27, 2022 · 15 revisions

Back to User Guide Main Page


SysNat uses double colons (::) to identify value references (i.e. placeholder for actual values). Any sequence of characters within a natural language instruction that does not contain a double colon is regarded as hard coded value and not as a value references. To reference a single value in an natural language instruction, use the double colon followed by its key. If there is only one set of test data the value reference looks very simple:

XXID: Example1 
"Member.Name"="Bob"

Enter in field "Name" the value "::Member.Name".

In the example above, the value reference will be replaced by "Bob".

For value references to data values read from an external file, you must first define the data file using the stage instruction TestData.

XXID: Example1 
TestData: OrderData

Enter in field "Name" the value "::Member.Name".

If more than one data files are imported, dataset names may be distinguished. If a data file contains only one dataset, its dataset has the same name as the file. To reference a value in it, use the dataset name followed by a double colon followed by the value's key, e.g.

XXID: Create new Order
TestData: OrderData1, OrderData2

Enter in field "Name" the value "OrderData1::name".
Enter in field "Name" the value "::name".

The datafiles are loaded in the order they are defined in the stage instruction TestData. The latest added test data file has the highest priority, this means, if the value key "name" is found in both OrderData1 and OrderData2, the value of OrderData2 is taken because the later added file has higher priority. To get a value from a lower priority file, its dataset name must be set before the double colon.

If a single text data file contains two or more datasets, the name of the dataset is represented by the file name folowed by an underscore followed by the order number of the dataset within the file (Exception: in Excel files each dataset has an explicit name - for more information see this tutorial).

XXID: Create new Order
TestData: OrderData1

Enter in field "Name" the value "OrderData1_1::name".

See also Synonyms.


Previous | Next

Clone this wiki locally