| T51 - Data Driven Testing: Convert your test scripts into Data Driven scripts |
| Task Description |
Convert your test scripts into Data Driven scripts. Data-Driven automated testing allows you to create automated test scripts that are more "generic". You can specify different set of data files and script will perform tests with that dataset.
Often problems found in applications are because certain data variation was never attempted. To improve quality generate large & different dataset and test the application with that.
T51.atmn
Note: Save the .atmn file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks
|
| Solutions |
 |
Record a new task
The following example is recorded on our support page http://www.tethyssolutions.com/support_form.htm to illustrate how you can use Automation Anywhere to convert your test scripts into Data Driven scripts.
- Start recording a new task by clicking on 'Record' button
- Go to the website (or application) you want to test
- Fill out various parts of the form using keystrokes and mouse clicks.
- Stop recording.
- The task would look like as shown in Screenshot 1
|

Screenshot 1

Screenshot 2

Screenshot 3

Screenshot 4 |
 |
Convert your script into Data Driven scripts
Automation Anywhere provides a feature where you can easily read data values from a text file. Using this feature you can separate your data and test scripts. Please see below how you can do that.
Create a new variable to read from a text file:
- Go to Tools->Variable Manager. Select user variables and click on new. Specify the name of a variable, select the type 'Value' and specify an option to 'Read from File'
Separate the script and data:
- Select any keystroke action, and double-click it to edit it.
- Replace the keystrokes with the variable defined above.
- Now, when you run this task, instead of playing the recorded keystrokes, it will read the value of the variable from the text file and play that value. The format of the variable in the text file will look as shown in Screenshot 4. For more information about how to read variables from a text file please refer to http://www.automationanywhere.com/solutions/ST/T12.htm
Using this data-driven test scripts now you can test various different scenarios simply by changing the value in the text file instead of changing the script every time. |
|
| When you run this task it plays back your recorded actions. Whenever it comes across any variables, it reads the values from the text file and plays that value. |
|
 |
| We started using this product to copy data from legacy system to new system. Now we use it just to do about anything automated. Countless hours saved. Thank you guys. |
- Jack Greenberg
|
| Read Customer Testimonies >> |
|