Tips to design test data before executing your test cases

I have mentioned importance of proper test data in many of my previous articles. Tester should check and update the test data before execution of any test case. In this article I will provide tips on how to prepare test environment so that any important test case will not be missed by improper test data and incomplete test environment setup.

What do I mean by test data?

If you are writing test case then you need input data for any kind of test. Tester may provide this input data at the time of executing the test cases or application may pick the required input data from the predefined data locations. The test data may be any kind of input to application, any kind of file that is loaded by the application or entries read from the database tables. It may be in any format like xml test data, system test data, SQL test data or stress test data.

Preparing proper test data is part of the test setup. Generally testers call it as testbed preparation. In testbed all software and hardware requirements are set using the predefined data values.

If you don’t have the systematic approach for building test data while writing and executing test cases then there are chances of missing some important test cases. Tester can’t justify any bug saying that test data was not available or was incomplete. It’s every testers responsibility to create his/her own test data according to testing needs. Don’t even rely on the test data created by other tester or standard production test data, which might not have been updated for months! Always create fresh set of your own test data according to your test needs.

Sometime it’s not possible to create complete new set of test data for each and every build. In such cases you can use standard production data. But remember to add/insert your own data sets in this available database. One good way to design test data is use the existing sample test data or testbed and append your new test case data each time you get same module for testing. This way you can build comprehensive data set.

How to keep your data intact for any test environment?

Many times more than one tester is responsible for testing some builds. In this case more than one tester will be having access to common test data and each tester will try to manipulate that common data according to his/her own needs. Best way to keep your valuable input data collection intact is to keep personal copies of the same data. It may be of any format like inputs to be provided to the application, input files such as word file, excel file or other photo files.

Check if your data is not corrupted:
Filing a bug without proper troubleshooting is bad a practice. Before executing any test case on existing data make sure that data is not corrupted and application can read the data source.

How to prepare data considering performance test cases?

Performance tests require very large data set. Particularly if application fetching or updating data from DB tables then large data volume play important role while testing such application for performance. Sometimes creating data manually will not detect some subtle bugs that may only be caught by actual data created by application under test. If you want real time data, which is impossible to create manually, then ask your manager to make it available from live environment.

I generally ask to my manager if he can make live environment data available for testing. This data will be useful to ensure smooth functioning of application for all valid inputs.

Take example of my search engine project ‘statistics testing’. To check history of user searches and clicks on advertiser campaigns large data was processed for several years which was practically impossible to manipulate manually for several dates spread over many years. So there is no other option than using live server data backup for testing. (But first make sure your client is allowing you to use this data)

What is the ideal test data?

Test data can be said to be ideal if for the minimum size of data set all the application errors get identified. Try to prepare test data that will incorporate all application functionality, but not exceeding cost and time constraint for preparing test data and running tests.

------------

How to prepare test data that will ensure complete test coverage?

Design your test data considering following categories:
Test data set examples:
1) No data: Run your test cases on blank or default data. See if proper error messages are generated.

2) Valid data set: Create it to check if application is functioning as per requirements and valid input data is properly saved in database or files.

3) Invalid data set: Prepare invalid data set to check application behavior for negative values, alphanumeric string inputs.

4) Illegal data format: Make one data set of illegal data format. System should not accept data in invalid or illegal format. Also check proper error messages are generated.

5) Boundary Condition data set: Data set containing out of range data. Identify application boundary cases and prepare data set that will cover lower as well as upper boundary conditions.

6) Data set for performance, load and stress testing: This data set should be large in volume.

This way creating separate data sets for each test condition will ensure complete test coverage.

Conclusion:

Preparing proper test data is a core part of “project test environment setup”. Tester cannot pass the bug responsibility saying that complete data was not available for testing. Tester should create his/her own test data additional to the existing standard production data. Your test data set should be ideal in terms of cost and time. Use the tips provided in this article to categorize test data to ensure complete functional test cases coverage.

Be creative, use your own skill and judgments to create different data sets instead of relying on standard production data while testing.

What is your experience?

Have you faced problem of incomplete data for testing? How you managed to create your own data then? Share your simple tips and tricks to create or use test data.

Like This post? Get all article updates in your inbox. Click here to register just giving your email ID.



Get FREE eBook + Blog Updates By Email!

Subscribe to get software testing awesome articles and free resources. Enter your email address and click 'SIGN UP NOW' button.


76 comments ↓

#1 Shruti S on 01.29.08 at 11:21 am

you are right vijay. I too faced the same data problem while testing.
client reported one bug that was only reproducible on large data and could not find that bug at my side.
since then i always prepare my required data..
i useuslly take bakup of all required SQL tables on my machine and use it for testing..

#2 R.Prakash, SQA Lead on 01.29.08 at 12:57 pm

Hi Vijay,

As you have mentioned in your article how test data is important, i too insist testers to prepare test data while they prepare testcases and execute with the same while executing the testcases.

R.Prakash
SQA-Lead

#3 Sameer Mandve on 01.30.08 at 5:44 am

Hi all,
The way Vijay suggested to append new Test data in existing Data each time.. try out ..Its really very Helpful.
Thanks….

#4 Prashant Netke on 01.30.08 at 7:34 am

A very good article, but I would like to elaborate more on Test Data design while load testing & stress testing. In this special test we need a huge Test Data which handle different conditions like Valid Test Data, Invalid Test Data etc. Loading an application with similar huge test data wont make your load test successful. To design such data for load testing is difficult, need to take help of automation tool to generate such volume of data with variations. I have faced such issues when I wanted to stress test a web application where I need to send 1000000 requests to web server while I have to consider all those conditions where the application may fail. Sometime its time consuming to Design or generate such Test Data.

#5 Vijay on 01.31.08 at 7:02 am

@ Prashant
I agree with prashant. To load test any application you need data variation. Don’t just replicate existing small data set to make it big. Make some variations while replicating this data. You can’t exactly predict the load test output using such huge but false data.

#6 Chandu on 02.14.08 at 5:28 pm

Vijay

I think this sentence is typed wrong..

“Filing a bug without improper troubleshooting is bad practice”

If I am not wrong, I think it should be

“Filing a bug without proper troubleshooting is bad practice”.

#7 Vijay on 02.15.08 at 5:22 am

@ Chandu
I really appreciate my reader’s contribution. Though I double check the draft post before publishing, sometimes such mistakes get unnoticed ;-) Thanks anyway

#8 praveen on 02.20.08 at 6:22 am

Hi ..Guys..anyone can u tell me how web testing is carried in an MNC what are the steps to be follow for the manual testing

#9 sanagmeshwar on 02.20.08 at 6:52 pm

HI all,
I would like to jump to Banking Domain in my Tesing career.
Can any body help me in this regard,like what is to done and what should I learn to get in this domain.
If possible send the document for this.(i am in embedded domain now)

#10 sangameshwar on 02.20.08 at 7:01 pm

Please help me in preparing myslef in Banking domain

#11 Suresh balaji on 02.22.08 at 12:04 pm

Hi Vijay,

Iam currently working in a organization as software programmer for the past seven months , Iam decided change my carrer to software testing,can change it,is it possible or not .If possible means what are the areas i want to know for testing.

#12 chandu on 02.25.08 at 10:03 am

chandu

hi everyone

i want to know which site gives better examples in testing, i mean coding(QTP,LOADRUNNER,WINRUNNER) point of view.

#13 selvam on 02.27.08 at 2:16 pm

Hi All, I am very new to the testing .Plz can anybody give me the list of sites which give the full details of software testing along with all the tables for test cases bug repot tables etc. though i had learned some basics about testing i lack the real time exposure ,can anyone help me?????????

#14 kathyayani on 02.29.08 at 5:10 am

Hi, I am very new to testing field.just now i got job in testing.I want the testing sites to learn manual testing completely along with formats also with examples.

#15 vijay on 03.06.08 at 6:55 am

hi,
you mentioned Valid data set, Invalid data set, Boundary Condition data set. what exactly you do in boundary data condition data set? it’s a combination of valid and invalid data set, right? if not, please give your feedback.

#16 seetapathi on 03.07.08 at 8:46 am

hi sangameswar,

You said that u r in embeded systems testing now. Can you please give me more details about that. Again exactly it’s which domain and what kind of testing u r doing now ..pls explain with testsetup ex.,

#17 Manik on 03.20.08 at 6:20 am

Hi All Yes Test Data is very important while testing because some bugs are identified only when we use invalid or negative test data like for eg in my one of project crash error was appearing only when i was entering data in format “”

#18 sheeba joji on 03.24.08 at 11:19 am

WHAT IS TEST condition expalin? give examples please

#19 sudha.K on 03.31.08 at 10:21 am

While working in upgrade testing like oragcle 9i to 10g
what kind of frame work we have to consider.

#20 sudha.K on 03.31.08 at 10:22 am

Please do me needful

#21 George on 04.04.08 at 9:40 am

@sheeba
It would be appreciable if you could ask your doubt in a sensible way. Today is 04042008 still your question is waiting for an answer. Anyhow let me try, The Test condition compares the values of two formulae. If the comparison yields true, then the condition is true and vice versa. Its just like If else conditional statement in programing languages. If i’m misleading, please let me know by strong comments.

#22 poornima on 04.04.08 at 10:15 am

hi george sir,

thank u 4 ur ans.but yeasturdy when i searched in the net i saw diferent ans now i forgot the site name.
any way thanku.

#23 Rahul on 04.04.08 at 10:30 am

@sheba
TEST condition –item that could varifyied by one or more test cases… OR…breaking the test into smallest unit…these defination by ISEB…
for further ping me rahulkumarbangalore@yahoo.co.in

#24 George on 04.04.08 at 10:34 am

@poorni
You might have forget the site name but you can recollect the stuff and share it with us, is it not?
One more thing, even i have years of experience, i’m not understanding the need for a “sir” salutation, same to vijay aslo…
comments will be appreciable

#25 sheeba joji on 04.11.08 at 8:33 am

Thanks for answers

#26 sheeba joji on 04.11.08 at 8:35 am

if possible , please forward me some sample test cases for a Text box field ,List box and Check box

#27 bgreddy on 04.12.08 at 5:57 am

this artical contain useful information about test data

#28 Norman on 04.16.08 at 8:12 pm

Iam not able to understand what is this APACHE AND TOMCAT SERVER is all about..are they different ?
Some say they are not and they are called as webapplication servers.By the way do application server and web server reside on the same machine or in different machines.How they are configured.
How a application server contacts webserver or vice versa..again are they configured on differnet machines .I am totally confused please help me understand this.Respond me to this e mail with your answers norman_g40@yahoo.com

#29 rahini on 04.22.08 at 6:44 am

hi,

explain me about Test data and test bed with suitable example and difference between them

thank you,
rahini

#30 pramodkumar on 04.29.08 at 6:43 am

plz tell me wt is test bed n test data

#31 Tiger2k on 04.29.08 at 9:58 am

Test Data are data which have been specifically identified for use in executing test scripts, and are used to verify the expected results obtained.

Ex : Let us consider i have a login screen which i want to automate,parameterize
and run 10 iteration, so i have to prepare a set of data of all user id and password before
i go for automation to get the expected results. This is call preparation of test data.

Test Bed or Test Environment is setting up of the both hardware and software requirements

Ex: Assume I have a PDA or handheld device or mobile, I have developed a software
which can change a format of a song from any format to mp4. After i converting the song, i will
get a list of mp4 files as a xml file. i can transfer this file from the computer to the handheld device
using USB cable.

Now for checking this entire scenario, i have to set up my software enviornment( data) and also
need to setup my hardware ( which is my PDA and my usb connected to my computer).

Hope its clear

Difference
Test Bed consist of test data and other hardware components i.e its a bigger
picture than only software data
Test Data are data which have been specifically identified for use in executing
test scripts, ( They may form a subset of test bed)

Please correct me if i am wrong.

#32 mahalakshmi on 05.06.08 at 9:58 am

hi … i am new to software testing, Can any one help me for testing procedure from the begining……….

#33 VijayD on 05.06.08 at 10:14 am

Hey,

Don’t confuse about Test Bed and Test Data, its very simple.

Test Bed:
Preparation for test execution is called Test Bed, i.e., installing your application (including pre-requisites like IE 6.0, .Net 2.0, IIS, Oracle, creating Windows User with Administrator rights etc), preparing database/schema.
That means making sure that the application is READY for test execution.

Test Data:
On the otherhand, test data is the data which is being used in the test execution (Eg, Input needs to be entered while creating a New User, First Name, Last Name, Age, Address, Sex, Phone Number etc comes under test data).

Hope this helps.

Regards,
VijayD

#34 Ayesha on 05.09.08 at 12:53 pm

Vijay, suggest me how should we verify larg size data? For example i am working on a project whose functional areas are dependant on its Configuration data. So to verify application’s functionality, we need to verify either the data is configured correctly or not. As data size is too large, currently we are writing generic test cases without test data and verifying it with those data files manually. What kind of test cases we should write for that? and what could be the best way to test it?

#35 Piyush Gupta on 05.15.08 at 4:19 am

Hi Vijay,

Please tell me whether we have different test data for different test cases or we have one pool of test data. Like take an example of login screen.

The test cases can be:

1. Verify that user is able to login to the application using correct UserId and Password.

2. Verify that user is not able to login to the application using correct UserId and wrong Password.

3. Verify that user is not able to login to the application using wrong UserId and correct Password.

4. Verify that UserId field accepts only 11 characters.

5. Verify that Password field should display the password in asterisks.

Regards,
Piyush
QA Engineer

#36 subba rao on 05.19.08 at 8:54 am

I need test data for Accounts General Ledger And Interfaces asap.

#37 akshata on 05.22.08 at 9:46 am

hi … i am new to software testing, Can any one help me for testing procedure from the begining……….

#38 Sathish on 05.28.08 at 10:40 am

Hi Vijay,
whether we need to write a procedure like test cases while preparing test data…???

#39 Manas on 05.28.08 at 10:55 am

Hi

Can any one send me a sample of test data doc or any test data format…
Thanx in advance

#40 Manish on 05.29.08 at 12:44 pm

Hi,
I need to have some info regarding variuos types of Test Data. I have got some stuffs like valid data, invalid data,No data, Illegal data. I need more of them. please suggest me with them or any link for reference.

#41 Radhika on 06.19.08 at 5:07 am

Hai,
It’s all clear abt test data and test bed-setup
In one of the new activity for PDF file verification we need to create test data.
Can you please explain what are all the things possible to inclued in the test data?

Also say whether test condition and test data are refer same or different?

Thanks,
Radhika

#42 shahid on 08.02.08 at 3:01 pm

Hi,

This is shahid having two years of exp in testing with manual and regression testing(QTP). Can any one help me getting a testing job in a reputed company.

#43 Saurabham on 09.11.08 at 11:44 am

Hi All,

Apart from many problems people mentioned above there is one more which i feel is very common to testers, that is to reproduce the errors which are caused by server configuration like NULL pointer errors.

Also we get error which are reported by the client on LIVE but are not at all generatable on test envn.

Could anyone tell that how to tacle such issues ?

Regards,
Saurabh

#44 pintu kumar on 10.22.08 at 11:35 am

Hi Vijay,
plz let me know how exactly we should prepare test data for a particular project with detailed eg

Regards
Pintu Kumar

#45 Bhisham kumar on 12.19.08 at 9:07 pm

Hi everybody
iam new tester engineer plz help me about this problem how to write functional test case of any website and how to prepare test scenario of any website and also help me what test in any website

from
bhisham kumar

#46 irem ekici on 01.11.09 at 8:02 pm

Hi all,
I am preparing a presentation about usability test data and test data garbages for my company. pls help me about finding docs for this topic…

best regards
irem

#47 Dr. Pacherie Jean-Lin on 07.06.09 at 8:09 pm

GenieLog has developped GEDIS Studio which is a workbench dedicated to the generation of realistic test data. GEDIS allows you to define constraints between fields and demographic control over the generated values. Check out our web site for some case study. There’s a community edition of GEDIS available for download.

#48 Muthulakshmi on 08.19.09 at 11:15 am

Hi All,
can anybody helpout in what is the difference between test data generation and test data creation.?
Thanks in advance.

#49 Dr. Pacherie Jean-Lin on 08.19.09 at 11:22 am

Test data generation is a way of creating test data. You might consider several ways of creating your test data such as extracting and post processing your production data or generating them from generation rules (pick radom value in a list, etc.)

#50 Prac on 11.24.09 at 9:03 am

Hello,

I want to prepare test data for my project. Can anyone give me sample format to follow?

#51 avkshanthi on 12.03.09 at 8:28 am

hai,

Shall i use datamining algorithm using optimization techniques for software testing. if possible, how to do that.

#52 Ram on 12.05.09 at 1:24 pm

Very nice article and impressed with the information posted here.

#53 Why Documentation is Important in Software Testing on 03.07.10 at 6:14 pm

[...] Documents/ manuals 7) User Acceptance Report 8 ) Risk Assessment 9) Test Log 10) Bug reports 11) Test data 12) Test [...]

#54 Vishwanath Venkatesan on 04.22.10 at 2:57 pm

You guys need to read a lot instead of blindly asking things. Doing a bit of research before posting in forums would be appreciable.

#55 anjali on 09.28.10 at 6:00 am

Hi all,
Can anybody help me out regarding from where Tester can get data for Testing.I hope some body will share his/her knowledge wid me.

#56 Gaurav on 01.10.11 at 7:43 am

Very nice article.
Thanks !!

#57 D.srikanth on 01.11.11 at 8:32 am

hi friends, this is srikanth from vizag.. now iam working in ITES department>>>>>
I AM HAVING interest in s/w testing field….compared to .net and java. testing field is easy na….
where i must join and how i must do>>> pls inform to my mail id:-baburao.srikanth@gmail.com
i hope all wil send mail to me>>>> bye friends

#58 Ranganath on 03.04.11 at 12:05 pm

Hi Vijay,

Very nice article and it helps to all testers and also for developers.

#59 uday on 03.16.11 at 9:41 am

Hi, I am very new to testing field.just now i got job in testing.I want the testing sites to learn manual testing completely along with formats also with examples.
and how to write cases in simple way

#60 Arun on 04.12.11 at 8:40 am

Assume that we are independent testing team. We don’t know the design or development LOE.
We need to provide the Testing LOE. And also assume that the project and its requirements are new to our testing team.

On what basis do we provide the testing LOE?

Please give a real time solution.

#61 tester on 04.12.11 at 11:39 am

Good article

#62 shrikant on 06.14.11 at 9:29 am

Very good information

#63 SHOAIB SIDHU on 06.30.11 at 3:59 am

Hello Guys,

The way Vijay suggested to append new Test data in existing Data each time… try out …Its really very Helpful.
Thanks….

#64 Tips for Writing Test Cases — Software Testing Help on 07.11.11 at 7:29 pm

[...] test data specified in TCs is feasible not only for actual testers but is according to real time environment [...]

#65 Amarjeet Chavhan on 07.26.11 at 8:58 am

This Article is perfect and should follow by every testing practice… But in my scenario… TIME is a major concerned.. What if time is not allowing you to create proper test data…???? How we can make sure that app is working fine ??

#66 Tal Harel on 07.29.11 at 9:44 am

How about using a test management tool? That would save most of the trouble of keeping your test data in order.

#67 ravi on 09.13.11 at 3:21 pm

Can any tell to create test data for SUM (calculation), Scenario is 0 to 9 digits are available as we see in the calculator, I want to certify that the sum of the two numbers are working fine by providing test data.

#68 kundan pandey on 01.08.12 at 5:12 am

we can get test data from the given requirement specifications .start validating test cases with these test data

#69 Mahesh on 04.18.12 at 4:07 am

USE GURU99 for any type of information related o software testing.

#70 anil on 04.19.12 at 9:37 am

I cant understand what is there in Guru99 website can u please explain it clearly

#71 karthika on 12.13.12 at 4:56 pm

I need example for invalid and illegal data

#72 Ashi on 04.30.13 at 11:13 am

Hi ,

I want to move from Application support to testing career. Currently I am 2.7 years experience. Please suggest on this lateral movement.The project what i am working on is open source hence do lot of development or enhancements. what do u think about the opportunities for the same.

#73 Thulasiram on 06.08.13 at 4:45 pm

I guess my reply would support for some performanace , Load and stress kind of testing ,

In Reality most of the times above said testing are done once application is stable and reliable , so try to convey to configuration team and functional testing team in advance to go for incremental deployment so that the data used by functional team over the releases lies in DB and add some data by Bulk insert using Batch files(Java) so that the huge data upload problem can be reduced.

#74 Amit Sharma on 11.26.13 at 11:36 pm

good information, very helpful, keep it up

#75 faraaz on 11.27.13 at 12:14 pm

Hi Vijay,
I need information whether In QC tool we have to Import data to Test Plan or Test Lab and where will it get stored. i.e there are 2 options we parametrize In both Test Plan and Test Lab. So we have to enter test data in test plan itself or while executing in Test Lab which one is better.
thanks

#76 A Real Software Testing Interview – Questions with Answers Mainly for Onsite Tester + Coordinator Position — Software Testing Help on 02.06.14 at 8:28 am

[…] phase involves writing detailed steps about how to test a particular feature, what data to enter (test data) and what is the expected […]