-
Notifications
You must be signed in to change notification settings - Fork 0
How to write and use natural language scripts?
A natural language (NL) script is represented by a sequence of natural language instructions that are stored in a nls-file. When writing NL scripts, you should avoid using hardcoded test data - use value references instead and import test data from data files. The content of NL scripts looks like a nlxx file but lacks any header. Imagine you have written a NL script called "Create order.nls". Now you can reuse this script any time with different data. For this purpose different alternatives exist:
A) Using stage instruction "TestData"
A1)
XXID: Create order
TestData: StandardOrderData
Execute script "Create order".
A2)
XXID: Create order
TestData: OrderData_1
"Create order".
A3)
XXID: Create order
TestData: CustomizedOrderData
Create order.
These three A variants do the same: they all call an instruction that executes the named script.
B) Defining test data with script call.
B1)
XXID: Create order
Execute script "Create order" with "StandardOrderData".
B2)
XXID: Create order
TestData: name=Donald, age=49
"Create order" with "CustomizedOrderData".
B3)
XXID: Create order
"Create order" with "StandardOrderData" and
name=Donald
age=49
.
In the last two B variants two values of the imported StandardOrderData are overwritten in order to create a special test condition.