Test Data
Test Data in Software Testing is the input given to a software
program during test execution.
A test data generator is a specialized software tool that
generates false or mock data for use in testing software
applications. The generated data may be either random or
specifically chosen to create a desired result.
Test Data Generator
Pros: of Test Data Generator
• A test data generator tools make sure that all the types of testing
is performed like positive and negative.
• Helps to identify bugs at an early stage which minimizes
management costs under all possible scenarios
• These are reusable and flexible
• They perform quickly and save manpower, chances of error,
operational costs and time
• They generate random as well as real data sets
Challenges of Test Data Generator
• Test generation is highly complex
• Arrays and pointers
• Objects
• Loops
• Modules
• Infeasible paths
• Constraint satisfaction
• Readability of generated tests
Ways to Generate Test Data
•Manually
•Mass copy of data from production to testing
environment
•Mass copy of test data from legacy client systems
•Automated Test Data Generation Tools
Test Data for White Box Testing
• To cover all branches
• To test all paths
• Negative API Testing
• Calling Methods with invalid parameters
• Calling Methods with invalid combinations
Test Data for Performance Testing
• Determining how fast system responds under a
particular workload.

Test data generator

  • 1.
    Test Data Test Datain Software Testing is the input given to a software program during test execution. A test data generator is a specialized software tool that generates false or mock data for use in testing software applications. The generated data may be either random or specifically chosen to create a desired result. Test Data Generator
  • 2.
    Pros: of TestData Generator • A test data generator tools make sure that all the types of testing is performed like positive and negative. • Helps to identify bugs at an early stage which minimizes management costs under all possible scenarios • These are reusable and flexible • They perform quickly and save manpower, chances of error, operational costs and time • They generate random as well as real data sets
  • 3.
    Challenges of TestData Generator • Test generation is highly complex • Arrays and pointers • Objects • Loops • Modules • Infeasible paths • Constraint satisfaction • Readability of generated tests
  • 4.
    Ways to GenerateTest Data •Manually •Mass copy of data from production to testing environment •Mass copy of test data from legacy client systems •Automated Test Data Generation Tools
  • 5.
    Test Data forWhite Box Testing • To cover all branches • To test all paths • Negative API Testing • Calling Methods with invalid parameters • Calling Methods with invalid combinations
  • 6.
    Test Data forPerformance Testing • Determining how fast system responds under a particular workload.

Editor's Notes

  • #5 Test generation is highly complex. The use of dynamic memory allocation in most of the code written in industry is the most severe problem that the Test Data Generators face as the usage of the software then becomes highly unpredictable, due to this it becomes harder to anticipate the paths that the program could take making it nearly impossible for the Test Data Generators to generate exhaustive Test Data. However, in the past decade significant progress has been made in tackling this problem better by the use of genetic algorithms and other analysis algorithms. The following are problem areas that are encountered while implementing the test data generation techniques for actual industry used code. Readability of generated tests Arrays and Pointers can be considered to have similar constructs and also suffer from the same kind of problems. Arrays and pointers create problems during symbolic execution as it complicates the substitution since their values are not known. Also, in order to generate input for arrays and pointers there are multiple problems like the index of the array, or the structure of the input that needs to be given to the pointer. This is further compounded by the possibility of dynamic allocation of arrays and pointers.
  • #7 Test Data for White Box Testing In White Box Testing, test data Management is derived from direct examination of the code to be tested. Test data may be selected by taking into account the following things: It is desirable to cover as many branches as possible; testing data can be generated such that all branches in the program source code are tested at least once Path testing: all paths in the program source code are tested at least once - test data preparation can done to cover as many cases as possible Negative API Testing: Testing data may contain invalid parameter types used to call different methods Testing data may consist in invalid combinations of arguments which are used to call the program's methods
  • #8 Test Data for Performance Testing Performance Testing is the type of testing which is performed in order to determine how fast system responds under a particular workload. The goal of this type of testing is not to find bugs, but to eliminate bottlenecks.  An important aspect of Performance Testing is that the set of sample data used must be very close to 'real' or 'live' data which is used on production. The following question arises: ‘Ok, it’s good to test with real data, but how do I obtain this data?’ The answer is pretty straightforward: from the people who know the best – the customers. They may be able to provide some data they already have or, if they don’t have an existing set of data, they may help you by giving feedback regarding how the real-world data might look like. In case you are in a maintenance testing project you could copy data from the production environment into the testing bed. It is a good practice to anonymize (scramble) sensitive customer data like Social Security Number, Credit Card Numbers, Bank Details etc. while the copy is made.