February 2015
Intermediate to advanced
328 pages
7h 29m
English
Whether it is for loading test data or writing reports, using external data files can be a key part of automated testing. Typically, you might need to read test data from a file and loop over some test steps until there is no more data. In this recipe, we see how this can be achieved easily using several reusable Groovy TestSteps.
For example, let's say we have a small CSV file of invoice data that we want to use to drive our tests:
1,comp1,100.0,2014-12-01 00:00:00 2,comp2,200.0,2014-12-02 00:00:00 3,comp3,300.0,2014-12-03 00:00:00
You can find this data in <chapter2 samples>/invoice.csv.
We will read each line and extract the values into properties, for example, to do something ...
Read now
Unlock full access