Testing Anywhere Call: 1-888-484-3535   

 
Testing AnywhereTesting Anywhere
  Home > Product > Solutions > T01  
T01 - Automated Test Data Generator
Test Description
To test your application, you often need large random data created in database. This example demonstrates how to use random variables to generate test data for testing.

T01.tamn    MyDBT01.mdb

Note: Save the .tamn file in My Documents -> Testing Anywhere -> Testing Anywhere -> My Projects

Solutions
Create Variables
  • Open Test Editor under Tools menu.
  • Click on ‘Variable Manager’ tab located on right side.
  • Click on ‘Add’ button in Variable Manager Panel and create two variables
    a) Random variable, $RandomString$ (Screenshot 1)
    b) Value type variable, $Count$
You can generate two types of random values in Testing Anywhere
  • String - Specify the length of random string you want to generate
  • Numbers - Specify the lower and upper range between which you want to generate random numbers. For e.g. to generate random numbers between 4 and 10 you would specify 4 in ‘From’ field and 10 in ‘To’ field.

Screenshot 1


Screenshot 2


Screenshot 3


Screenshot 4


Screenshot 5


Screenshot 6
Use Database commands to create and insert random data.
  • Insert Database:Connect command to connect the database. Create connection string and save the command.
  • Insert a Loop command to insert 100 records in a table. Select Times loop, enter 100 times and save the command.
  • Use ‘Insert SQL Statement’ Database command to insert the data into the table. Select ‘Insert/Update/Delete’ option, enter insert query and save the command. (Screenshot 2)
Retrieve inserted data from the table for testing.
  • Double click Database command, select SQL query option, enter the select statement and save the command. (Screenshot 3)
  • Insert a Loop command to trace the data retrieved by above SQL query. Select ‘Loop for Each row in a SQL query dataset’ option and save the command.
  • Insert a Variable Operation command inside the Loop to count the number of records retrieved. Enter ‘Count’ variable in left side text box, enter ‘Count+1’ in right side text box and save the command.
Insert a Checkpoint to check total number of records traced.
  • Double click ‘Insert Checkpoint’ command located under ‘Advanced' Command Category.
  • Select Variable option, enter the ‘Count’ variable in variable text box, select ‘Equal To (=)’ from the list, select the ‘Fix’ option, enter ‘100’ in Fix text box and save the command. (Screenshot 4)
Disconnect the database.
  • Insert Database Disconnect command to disconnect the database.
  • You can view the text format of entire test case in Screenshot 5

When you run this test, it will enter 100 random values in your table. You can change 100 to any other number and enter thousands of rows for testing purposes and save time creating those records in your database.
Buy Now Free Trial

Next Steps
Watch a flash demo Watch a flash demo
Contact me Contact me
Ask the Expert Ask the Expert
Request live demo Request live demo

Call 1-888-484-3535

25,000+ Customers
ibounce

We are currently using the software to do functional and performance testing of our customized version of Microsoft CRM. In addition, we are also using it for functional testing of a custom, in-house, financial application, and to do quality assurance on a CD that contains encrypted Adobe .pdf files, that are distributed for us by a third-party vendor. It allows us to do repeatable, reliable performance and functional testing, load test data with only “one-click”, and verify third-party vendors work. It saves us time and money, because after the initial “ramp-up” time learning it, we can quickly write tests that perform hours of work in only minutes. A great test tool, that we highly recommend! Thank you !!!
- David Abrahams,
Manager - Quality Assurance, Commonwealth Financial Network
Read Customer Testimonies >>
  Products     Download     Purchase     Support     Customers     Company     Sitemap     Trademark FacebookTwitterBlog © Automation Anywhere 2010 Privacy Policy