What is the best approaches to handle data in Test Automation?

(Viral) #1

For the handling the Data in the test automation script, I’m aware about the two approaches

  • Creating a data generation scripts,

  • Predefine the data and direct use that in script

  • In the first approach, We are developing the scripts, that will run before the test and generate the data

  • In Second approach, We manually create the data like User or some configuration for user and then use that data directly into the scripts

So In the long run of the projects, What are the best approaches to handle the data that will have less maintenance ?

(Yoshiki) #2
  1. create test data manually
  2. backup DB by using script
  3. execute automated test
  4. rollback test data from backup
    (and loop 3 and 4…)

This approach is like your first approach.

(swapnali kadu) #3

Use these top tips to ensure that your software testing is successful and you get the maximum return on investment (ROI):

  1. Decide what Test Cases to Automate
  2. Test Early and Test Often
  3. Select the Right Automated Testing Tool
  4. Divide your Automated Testing Efforts
  5. Create Good, Quality Test Data
  6. Create Automated Tests that are Resistant to Changes in the UI

(Joe) #4


When I think of test data and automation, I think of a test that must evaluate a product when the data varies. That is, the more diverse the test data, the more behaviors that can be evaluated.

One of the best sources of diverse data is production. I’ve been fortunate to be able to evaluate production data in a couple of ways. In one project, we received a set of production data and scrubbed the sensitive parts. We presented this data to the product in a non-production environment. This help us tremendously to identify errors before allowing the data to enter our production system and possibly cause downstream errors.
In another project, a team routinely collects production requests to their system, scrubs sensitive data, and places the request into a non-production database. These requests are available to use in testing. I found them very valuable because they were very diverse.