Showing posts with label How to create test data. Show all posts
Showing posts with label How to create test data. Show all posts

Wednesday, 13 February 2013

Challenges in Production Cloning approach

In my previous articles, I have already discussed the topics "How to create Test Data" and "Top 3 Challenges in using Production data in Test Environments".  In this post we will focus on the challenges that we face in Production Cloning approach and how to overcome those challenges.

1.  Infrastructure

Even though it is highly recommended to have the Test Environment in the same lines as Production, it is not always feasible to test under those real-time conditions.  It is highly recommended to do Performance / load / stress tests exactly mimicking the Production database, but the expensive infrastructure requirements might be an overkill for Functional Testing.  But cloning might force you to have production like infrastructure which will translate into higher costs for the customer.

2.  High Storage Costs

Another major challenge associated with Production Cloning is that all the production data needs to be stored in testing region.  Assuming the production data is 50 TBs (Terabytes), the Test Database also needs to hold 50 TBs of data.  So storage has to be provided for storing all of the data.  And with the databases being backed up regularly, that would mean higher storage costs for the customer.

Saturday, 9 February 2013

TDM Topics to be covered in this blog

Hello all,

The intention of this blog is to share my insight and knowledge in the area of Test Data Management.  I am looking forward to write a few posts in the following topics.  I will write those whenever I get some free time.  Thanks.

Rajaraman R

Saturday, 2 February 2013

How to create Test Data?

Let's assume you have a very basic testing need.  You need to have around 50 customers created in your system for testing it.  Lets assume it is a web based application.  In fact, the concept is applicable to any technology/application.  So you have a customer creation screen as shown below.

So how do you create the test data that is required for you.

Basically there are 3 approaches to do it:
  • Manual approach
  • Functional Automation Approach
  • Database Approach

Manual Approach:

In the manual approach, you would manually feed the data in the screens and then create a customer. And similarly you would do this for 50 customers.  Needless to say the time taken to do it in a manual fashion is going to be big.

The time taken for the example application would be :
For 1 Customer = 1 min.
For 50 Customers = 50 mins.

Functional Automation Approach:

In the automated approach, you would automate the user interface (UI) for creating the data.  Thus you will effectively speed up the process of creating the required test data.  In our example, we would automate the web based UI using a Automation Tool such as QTP, RFT, Selenium, etc. and then data drive those tests to create the data that we require.

The time taken for the example application would be :
For 1 Customer = 10 seconds
For 50 Customers = 500 seconds = 8 mins.

Database Approach:

In all probabilities, you will have plenty of real-time customer information lying around in your production database.  So our job will be to query the right set of customers from the production database and load them into the test database.  Simple.  The data is ready to be used for testing.

Here in our example application, since its a pretty straightforward requirement, we would fetch the first 50 rows from the Customers table in Production and Insert those rows into the Customers table in Test Database.  The work flow will be as depicted below.

The time taken for the example application would be :
For 50 Customers = 60 seconds = 1 min (Just an example)

NOTE: The above example assumes that the back end is a Microsoft SQL Server database and hence the "SELECT TOP 50" query.

As you can see, the database approach is much faster than any of the other approaches.  The effort savings are enormous in a real time test data requirement as the data volumes are much higher. 

This methodology of creating test data directly from the Production data will form the corner stone and the building block of the concept called Test Data Management. Of course we are dealing with real time data and hence we need to secure the data before loading it into the Test Database, but we would deal all those topics in a separate post.

Hope the information was useful in giving a basic idea about Test Data creation.  I welcome your comments.  Cheers.

About the Author

Rajaraman Raghuraman has nearly 8 years of experience in the Information Technology industry focusing on Product Development, R&D, Test Data Management and Automation Testing.  He has architected a TDM product from scratch and currently leads the TDM Product Development team in Cognizant.  He is passionate about Agile Methodologies and is a huge fan of Agile Development and Agile Testing.  He blogs at Test Data Management Blog & Agile Blog.  Connect with him on Google+