Documenting your automation scripts

It’s very important to document automation scripts in order to facilitate the maintenance. This can be achieved by including “Test Scenarios”, and “Test Steps” operations within your tasks.

In the example below, the requirement is to read data from a CSV file, add certain key value pairs into a Dictionary and then validate data from the CSV file against the dictionary.

1/ In the Home tab on the ribbon, click on the Test Definition button. You will see a new layout where the Toolbox consists of only Test Step and Test Scenario operations, and at the bottom you will have a new (empty) view called “Test Steps”:

2/ Create a new task and add a “Test Scenario” operation that describes the set of activities that will be automated. In this case I have defined the following properties:

3/ Add 3 separate “Test Steps” operations under this Test Scenario:

As you can see these simply provide a skeletal structure to the task and automation steps can be added within, or after, the Test Steps. Within the Test Steps pane at the bottom of the window you can see the properties that have been defined within each of the Test Steps, without having to click into them: