WSO2Con2024 - Software Delivery in Hybrid Environments
Automated Test Data Generation- Discussion, Advantages, Trends and Techniques
1. Automated Test-
Data Generation
(ATDG)
Intro, Techniques, Advantages, Trends.Rana Qamar Ul Zaman
IUB1472113
BSCS 2014-18 Morning Faulty of Computer Sciences
The Islamia University of Bahawalpur
Bahawalnagar Campus
2. Outline
• Introduction to ATDG
• Basic Concepts Related to Software Testing
• Basic Concepts Related to ATDG
• ATDG Techniques
• Trends
• Class Discussion
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
3. Automated Test Data Generation
Introduction
And
Basic Concepts
(Software Testing & ATDG)
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
4. Introduction to ATDG
– Automated Test Data Generation, commonly
known as ATDG, is a technique to create
different test cases in an automated fashion,
apply them and then record and summarize
the collected data/result.
• What we need is 100% automated testing to reduce
overall cost of software development with high quality.
• It usually makes the testing more efficient and cost
effective.
“
”
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
5. Basic Concepts (Software Testing)
– Software testing is the process of ensuring
right software product to achieve full
customer satisfaction.
• The following terms are mostly used for automated test data
generation research.
– Test data
– Test Case
– Test Oracle
– Test Suite
– Test Plan
”
“
− Coverage
− Path
− Branch Predicate
− Feasible Path
− Infeasible Path
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
6. Basic Concepts (ATDG)
• Program Analyzer:
– It analyzes the source code automatically. Program
analyzer takes a piece of software as input and
produces necessary data to be used by path selector
and/or test data generator.
– Control flow graph
– Data flow graph
– Data dependence graph
– Program dependence graph
– Extended finite state machines
Are Used For Program Analyzing.
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
7. Basic Concepts (ATDG)
• Path Selector:
– The path selector identifies a set of paths to satisfy
selected testing criterion.
– A good path selector ensures high coverage of code.
– we are interested in basis set of paths
– A basis set of path should be linearly independent
covering all edges of CFG
– This phase is ignored in many recent test data
generation techniques.
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
8. Basic Concepts (ATDG)
• Test Data Generator:
– The Test data generator utilizes the information
generated by the program analyzer and /or path
selector.
– Once path information is obtained, aim of TDG is to
find input values that will traverse a specific path.
– This is achieved by finding the path predicate and
then solving it in terms of input variables.
• Alternating variable
• Simulated annealing
• And different heuristics based on equation-rewriting
can be applied
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
9. Automated Test Data Generation
Automated Test Data
Generation Techniques
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
10. ATDG Techniques
• Functional Testing Techniques
– These techniques are based on the functionality of the
software, where test cases are derived from the
program’s specification.
– Examples:
• equivalence partitioning
• boundary value analysis
• random testing
• functional analysis-based testing
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
11. ATDG Techniques
• Structural Testing Techniques
– These techniques are based on the internal structure
of a program.
– where test cases are selected so that structural
components are covered.
– Examples:
• Statement testing
• Branch testing
• Path testing
• Predicate testing
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
12. ATDG Techniques
• Random Approach
– In this technique, random inputs are generated until
any useful input is found.
– quick and simple but might be a poor choice
– The biggest issue for random approach is that of
adequate test data selection.
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
13. ATDG Techniques
• Path Oriented Approach
– In path-oriented test data generation the typical
approach is generation of a control-flow graph.
– Steps:
• CFG Generation
• Path Selection
• Test Data Generation for Selected Path
– The biggest issue for random approach is that of
adequate test data selection.
– Might face the problems like infeasible path problem
Step3 is done with the help of
techniques such as
Symbolic evaluation (for
static)/function minimization
otherwise.
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
14. ATDG Techniques
• Goal Oriented Approach
– In the goal-oriented approach test-data is selected
from the available pool of candidate test data to
execute the selected goal irrespective of the path
taken.
– Steps:
• Identification and Selection of Statements
• Input test data generation for every statement
‒ Faces issues of goal selection and selection of
adequate test data.
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
15. ATDG Techniques
• Intelligent Approach
– The intelligent test-data generation approach often
relies on sophisticated analysis of the code to guide
the search for new test data.
– Can be extended up to the intelligent analysis of
program specification.
– Quite limited in use for now.
– Its pros and cons cannot be stated with any certainty.
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
16. ATDG Techniques
• Static Methods
– The static methods do not require the software under
test to be executed.
– Can be extended up to the intelligent analysis of
program specification.
– Quite limited in use for now.
– Its pros and cons cannot be stated with any certainty.
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
17. ATDG Techniques
• Static Methods
– The static methods do not require the software under
test to be executed.
– They generally use symbolic execution of SUT.
– Executing a program symbolically means that instead
of using actual values, ‘variable substitution’ is used.
– Adapted for:
• the requirements documents
• design diagrams and
• the software source code
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
18. ATDG Techniques
• Dynamic Methods
– Instead of using variable substitution, these methods
execute the SUT with some, possibly randomly
selected input.
– The system can determine whether the intended path
was taken or not.
– If the path is wrong, it backtracks until to node that is
root of error.
– Intended branch is taken by input manipulation.
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
19. ATDG Techniques
• Hybrid Methods
– A hybrid method is the mixture of static and dynamic
methods side-by-side or synthetic.
– Side-By-Side:
• solving some tasks by using static methods and some
by using the dynamic methods.
– Synthetic:
• the symbolic execution is used for a dynamic approach
Any Of The Given Types Could Be Used As ATDG
Technique
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
”
“
20. Automated Test Data Generation
Trends in
Automated Test Data
Generation
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
21. Trends in ATDG
By: Qamar Ul Zaman BSCS 14-18 IUB BWN
• Future Research Directions
• Development of efficient
construct solver.
• Test data generation for test
effectiveness and code
coverage Analysis.
• Testing object oriented
software using UML
modeling.
• Improvement of test data
generation for programming
constructs having dynamic
data structure.
• Test data generation for recursive
programs and
procedures/functions.
• GUI testing.
• Agile testing.
• Test data generation for programs
having variable length array and
loops with different dimensions.
• Improvement of scalability of test
data generation specially
networking softwares.
22. Automated Test Data Generation
Thank You !
Discussion Time…
By: Qamar Ul Zaman BSCS 14-18 IUB BWN