Best practices in Test Data Generation

Mar 28, 2017 0

With emerging trends, the technology is also shifting from code generation paradigm to data model. The main idea behind test data generation is testing the competence of a software or an app. Testing an app with real data is important to bridge with real time scenarios and make the necessary changes accordingly.

Classification of Test Data Generators

Test Data Generators can be broadly classified into:

Arbitrary Test Data Generator: As the name suggests, it is a random test data generator. It is the most uncomplicated data generation technique and is based on prospects. Thus, it can’t achieve high quality coverage of test data.

Download Whitepaper: Test Data Management – Key Challenges and Test Approach

Aim-Oriented Test Data Generator: Here, input set is generated for any path, instead of entry to exit block of code. Control flow graph plays a very vital role in these types of test data generation technique, thus reducing a probability-prone and infeasible path based test data generation and providing an opportunity of direct search.

Path-Oriented Test Data Generator: This is the best test data generation technique among the lot. In this, an unsurpassed specific path is offered, instead of multiple paths for a control flow. This technique is centralized on fault based testing. Another name for this type of testing is Mutation Testing. The changes done in the code after this type of test are called ‘mutants’.

Intelligent Test Data Generator: This technique draws upon the complicated analysis of code to pave way for the search of test data. Here, test data generation method is utilized along with the comprehensive analysis of the code. This technique involves thorough analysis to anticipate different upcoming situations.

Test Data Generator Life Cycle

Steps involved in Test Data Generation are as follows:

  • Control Flow Graph Creation: It consists of the representation of possible transfer of control.
  • Path Selection: In this step, the path of program – especially the control flow, is identified.
  • Input Data Derivation: After the selection of path, set of realistic input data are generated for the selected path, determining the control flow. This is the test data generation step.

A test data generator takes help of Program Analyzer for the same. Program Analyzer has many tasks to complete during the process. The Program Analyzer firstly retro inspects the control flow graph and approaches the path selector to gather the set of selected paths. Again, it’s the Program Analyzer which mulls over the control flow graph and data dependence and approaches Test Data Generator to generate test data set for each flow. Test Data Generator also consults the Path selector before test data set generation to ensure the authenticity of available path information.

Best Practices for Test Data Generation

  •  Naming Canon: The name of the test data should be in accordance of module name or functional area to make the reference very clear to the future onlookers.
  •  Test Data Requisites: The expected performance should be clearly mentioned. Dependencies should also be declared with clarity. The functions and modules which will use the test data should be clearly queued as well.
  •  Range of test data: The range should be specified well in advance for each data.
  • Re usability should be taken care of: The Test data should be written in a way that they can be used in the future too.
  • Maximum Coverage: Test data should be optimum in number and should have the maximum coverage.
  • Anon clause should be clear: Changes to be made to test data should be clearly mentioned to be used for later test case in case of identical functionality.
  • Scope field: The scope field like test boundaries, OS, database types etc. should be clearly declared.
  • Description: A brief description of test data should be given, which specifies the objective of the test data.

Challenges faced in Test Data Generation

Test data generation is quite complex as there is no standard skeleton for finding out the test data. The following are the various areas which require further study for test data generation:

Arrays and Pointers: The main problem exists during the symbolic execution, especially dynamic allocation of array and pointers and index or array or structure of the input of the pointer.

Objects: The OO features intensify the complexity as objects aredynamic by natureand it’s difficult to find out the exact code that would be called at run time. Use of mutation has been attempted to combat this problem.

Loops: Which path will be followed at the run time always remains a question mark, thus making the entire process of test data generation complex.

Despite these and a few other prevailing problems and challenges, Test Data Generation is making tasks easier with various available possibilities of creating large quantities and/or random data for testing purposes, thus reducing code conversion efforts.

Lets Connect Meet, Connect with TechArcis Quality Engineering Experts at QAI QUEST 2017

How can TechArcis assist?

TechArcis has expertise in enabling independent testing services, and is far ahead of the curve in following the process of Continuous testing Integration.

We’re focused on delivering high value added engagements with measurable returns on your investment. Simplify your test data management to reduce your software development and testing costs. Talk to us today

Other Resources

More Related Blog

software testing help in fortifying cyber security
Dec 8, 2017 0

How Can Software Testing Help In Fortifying Cyber Security?

Rapidly growing cyber applications and software solutions streamlines the work process in most of the industries. But the only hindrance here is the threat of cyber attack. Various web and mobile software’s capture and hold crucial corporate data and it … Continue reading "How Can Software Testing Help In Fortifying Cyber Security?"...

Read More
Mar 17, 2017 0

Things You Need to Know about Software Testing in 2017

The past half-decade, and most of 2016 markedly saw a surge in new technological trends in various walks of the software industry. While IoT and machine learning driving a shift towards artificial intelligence, the year left a gaping requirement in … Continue reading "Things You Need to Know about Software Testing in 2017"...

Read More
Dec 14, 2016 0

Challenges in controlling QA and Testing budgets

IT spend on QA and testing has been on the rise since 2012. From 18% and 23% in 2012 and 2013 to 26% and 35% in 2014 and 2015 respectively, it experienced a slight dip in 2016 with the average industry spend in this domain standing at 31%......

Read More