Spread the love

How To Create Test Data for Advanced Test Structure or Test Framework

Spread the love

In my last couple of posts, Structure of Automation Test Cases and
Best Test Structure:: Hermetic Test Pattern, I have shown each test case should be independent to each other. But to make them really independent it requires test data manipulation. Test data also need to be independent and unique in nature.

Why test data creation is required?

It is required to stop data pollution.Stop using polluted data usage inflow and outflow.
I am writing a few common methods to make test data independent:

  1. Use test cases id or name at the end of the test data like Cutomer_Name=”Rabin”+”Test123″;
  2. Use timestamp to make test data unique like-Customer_Name=”Rabin”+”3103201515082015”;
  3. Use random number generator to create unique testdata.like-“Robin”+rand.nextInt(900) + 100;

I like the Random number generation method and if it is not possible to use, I generally use the test case id.
More note on Random number generation:

RandomStringUtils.random(10, false,true);

you need to import – org.apache.commons.lang3.RandomStringUtils package
this is very useful when generating 10 digits random number.

AtomicInteger counter = new AtomicInteger(1);

This is also very useful to get a unique number.

Knowledge is the key for test data creation

Training of the product is an important aspect in order to create test data for a large test set. Joining the story grooming session may be very important. A larger development group with an equally large test team with a lack of knowledge on the product may fail in the long run when development is in agile or rapid development mode.

READ  Regular Expressions in VBScript or QTP or UFT
READ  Regular Expressions in VBScript or QTP or UFT

This lack of knowledge will produce less important test data or some test data which are are not up to the mark for bug catching purpose. Overall the product and testing will have poor quality.

Next, the development team will tend to ignore the issues raised by the test team due to lack of knowledge and insufficient test data.

Use of test data testing tool

A database testing tool for APIs queries to the database can be written in Java, JDK, JDBC, and SQL. This may support testing for some small scale testing. But when your team is quite big, and you are dealing with large test data, You better use some test data generation and automation tool for tailor make the test data for your automation.

TestData life cycle

Testdata life cycle
Testdata life cycle

Every testdata upon creation should get a review from the scrum team for its effectiveness. There could be reworked for the same. The reviewed test data is called a candidate for testing. Automation team may make it active and put in the test suite or they may suspend the test data. All suspended test data needs further review or rework to make it effective. Once the review process is completed, it is valid to test for the flow. Now the active test data once serve significance amount of time, automation team may scrap the same and declare it as retired. All retired test data are marked for deletion for an effective new data.


Spread the love
Animesh Chatterjeehttps://techtravelhub.com/
I am the founder and owner of the blog - TechTravelHub.com, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on ani01104@gamil.com

Related Articles

Learn Object Repository in UFT in An Efficient and Fast Manner

Object Repository in UFT The post will cover the following topics Details...



Please enter your comment!
Please enter your name here

Recent Posts

Super Keyword in Java Simplified

Super Keyword Super Keyword in Java Simplified: Java defines a special...

Learn Object Repository in UFT in An Efficient and Fast Manner

Object Repository in UFT The post will cover the following...

Learn What Primary Tools For Test Automation

Primary Tools For Test Automation According to the Gartner report...


Spread the love