SlideShare una empresa de Scribd logo
1 de 45
Descargar para leer sin conexión
SWARM INTELLIGENCE
TECHNIQUE
AND
ARTIFICIAL INTELLIGENCE
TECHNIQUE
IN
SOFTWARE TESTING
(TEST DATA GENERATION)
INTRODUCTION
 Overview
 Product vs. Project
 Software
 Software Development
 Software testing
 Test cases
 Test data
 Manual test data
 Automatic test data generation
 Objective of research
 White box testing
 Automatic generation of paths
 Automatic generation of test data
SOFTWARE TESTING
 Basic Testing process
o One of the practical methods commonly used to detect the presence of errors
(failures) in a computer program is to test it for a set of inputs.
Our program
The output
is correct?
I1, I2, I3,
…, In, … Expected results
= ?
Obtained results
“Inputs”
TEST DATA
 Manual test data
 Data which is used to test a
software or program is known
as test data. We can have test
data in excel sheet which can
be entered manually while
executing test cases .
 Automatic test data
 In this, test data can be read
automatically from files
(XML, Flat Files, Database
etc.) by automation tools.
MANUAL TEST DATA
Application to test Test data in excel sheet
AUTOMATIC TEST DATA
WHITE BOX TESTING
 Internal structure of the software
 No concern with the external structure(GUI)
 Types of white box testing
 Statement testing
 Branch testing
 Path testing
PATH TESTING
 Draw the CFG using the code for which test cases have to be
generated.
 Determine the cyclomatic complexity of the graph.
 Cyclomatic complexity provides the number of independent paths.
Find a basis set of independent paths through the program control
structure.
 The basis set is the base for generating the test cases. Based on every
independent path, choose the data such that this path is executed.
CONTROL FLOW GRAPH
 Integer i, j, k
1. read i , j , k
2. if ( i < j )
3. if ( j < k)
4. i = k;
else
5. k = i ;
end if
end if
6. print i , j , k
end example
Source code of program Control flow graph
SWARM INTELLIGENCE
 Swarm intelligence is the collective behavior of decentralized, self
organized systems ,natural or artificial.
 SI systems consist typically of a population of simple agents
or boids interacting locally with one another and with their
environment. The inspiration often comes from nature, especially
biological systems. The agents follow very simple rules, and
although there is no centralized control structure dictating how
individual agents should behave, local, and to a certain degree
random, interactions between such agents lead to the emergence of
"intelligent" global behavior, unknown to the individual agents.
SWARM INTELLIGENCE
 Techniques
 Ant colony optimization
 Ants find the shortest path
between nest and the food
using pheromone trials.
SWARM INTELLIGENCE
 IWD algorithm
 IWD algorithm is a new
swarm-based optimization
algorithm inspired from natural
rivers. In a natural river, water
drops move towards center of
the earth, due to some
gravitational force acting on it.
Due to this the water drop
follows the straight and the
shortest path to its destination
IWD ALGORITHM
 In the proposed approach, IWD is applied over the Control Flow
Graph (CFG) to obtain the number of paths available in the program.
The CFG depicts the logical control flow of the program. All
linearly independent paths could be obtained by CFG .Independent
path is the path in the program that determines at least one new set
of processing statement. In other words it introduces at least one
new edge in the graph.
ARTIFICIAL INTELLIGENCE
 Artificial Intelligence (AI) or Soft computing techniques are the
science, and engineering of making intelligent machines, especially
intelligent computer programs.
 These techniques have the ability of computer, software and
firmware to do those things that we, as humans, recognize as
intelligent behavior.
ARTIFICIAL INTELLIGENCE
 Techniques
 Expert system
 Knowledge base system
 Neural networks
 Evolutionary algorithms
 Genetic algorithm
GENETIC ALGORITHM
 Genetic algorithms are a part of evolutionary computing, which is a
rapidly growing area of artificial intelligence.
 Genetic algorithms searching mechanism starts with a set of
solutions called a population. One solution in the population is
called a chromosome. The search is guided by a survival of the
fittest principle. The search proceeds for a number of generations,
for each generation the fitter solutions (based on the fitness function)
will be selected to form a new population.
 During the cycle, there are three main operators namely
reproduction, crossover and mutation. The cycle will repeat for a
number of generations until certain termination criteria are met. It
could terminate after a fixed number of generations, after a
chromosome with a certain high fitness value is located or after a
certain simulation time.
GENETIC ALGORITHM
 Following steps gives the outline of the basic Genetic
Algorithm:
 [Start] Generate random population of n chromosomes
(suitable solutions for the problem)
 2.) [Fitness] Evaluate the fitness f(x) of each
chromosome x in the population
 3.) [New population] Create a new population by
repeating following steps until the new population is
complete
a.) [Selection] Select two parent chromosomes from a
population according to their fitness (the better fitness,
the bigger chance to be selected)
b.) [Crossover] with a crossover probability cross over
the parents to form new offspring (children). If no
crossover was performed, offspring is the exact copy of
parents.
c.) [Mutation] with a mutation probability mutate new
offspring at each locus (position in chromosome).
d.) [Accepting] Place new offspring in the new
population
 3.) [Replace] Use new generated population for a further
run of the algorithm
 4.) [Test] if the end condition is satisfied, stops, and
returns the best solution in current population
 5.) [Loop] Go to step 2
GENETIC ALGORITHM
 Representation of
chromosomes
 Binary
 Permutation
 Value
 Binary
Chromosome A 00011
 Permutation
Chromosome B 1234567
 Value
Chromosome C back, forward
GENETIC ALGORITHM
 Selection operators
 Roulette wheel
 Rank
 Elitism
GENETIC ALGORITHM
 Operators of GA
 Crossover
 Single point crossover - one crossover point is selected, binary
string from the beginning of the chromosome to the crossover point
is copied from the first parent, and the rest is copied from the other
parent.
Chromosome A= 11110000
Chromosome B= 00001111
After single point crossover,
Chromosome A= 1111000|0
Chromosome B= 0000111|1
Chromosome C= 11110001
Chromosome D=00001110
GENETIC ALGORITHM
 Two point crossover - two crossover points are selected, binary
string from the beginning of the chromosome to the first crossover
point is copied from the first parent, the part from the first to the
second crossover point is copied from the other parent and the rest is
copied from the first parent again.
Chromosome A= 1111|000|0
Chromosome B= 0000|111|1
Chromosome C=11111111
Chromosome D=00000000
 Mutation
Bit inversion - selected bits are inverted
Chromosome A= 1111000|0
Chromosome B= 11110001
PROPOSED WORK
 Test data generation using IWD and GA
 Working process
 Step 1.) Take an algorithm (or source code) of a program.
 Step 2.) Convert the algorithm (or source code) of a program into
the corresponding control flow graph.
 Step 3.) Apply IWD on the control flow graph of a program.
3.1 All the independent paths present in the graph will be
generated.
 Step 4.) Select the target path.
 Step 5.) Then use GA technique to generate the test data as input to
the program which will traverse the target path.
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 A case study has been taken, describing a customer's activity of
withdrawing money from ATM.The scenario considered here for
design of fitness function is that the customer tries to withdraw
certain amount from the ATM machine (this withdrawal amount is
the initial test data generated randomly, with an assumption that
customer entering the withdrawal amount is random).
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 Pseudo code of ATM Activity
 Step 1.) Customer inserts the ATM card in the ATM machine.
 Step. 2) Card number is read by the bank database.
 Step 3.) Request for the pin number is generated.
 Step 4.) Customer enters the pin number.
 Step 5.)If pin number is correct
Then
Menu appears
Else
Enter the pin again
 Step 6.) Request for the money withdrawal by the customer is
entered in the ATM machine.
 Step 7.) Balance request is send from ATM to the bank database.
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 Step 8.) From bank database, amount request is send to the ATM and
asks the customer to enter the withdrawal amount.
 Step 9.) Customer enters the withdrawal amount and request is send
to the bank database.
 Step 10.) Bank database checks whether the enter amount is valid,
If amount is valid, then debit process takes place
Else
No transaction possible.
 Step 11.) If debit process takes place, response from bank database
is given to the customer by dispensing cash to the customer.
 Step 12.) Customer collects the money.
 Step 13.) Request from database to the customer, want a receipt?
 Step 14.) If Customer replies yes to the request.
 Step 15.) A printed cash receipt is generated.
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 Taking an algorithm of an ATM withdrawal activity.
 T_ bal = 25000, min_ bal = 1000;
1. Wd_ amt(1:i)=x(1:i);
2. Am_ left(1: i) = T_ bal – wd_ amt(1:i);
3. if wd _ amt(1: i) < T_ bal
4. if Am_ left(1: i) > min_ bal
5. success_ bal(1: p) = Am_ left(1: i);
Else
6 failure _bal(1:k) = Am_ left(1:i);
7 test data(1: p) = wd_ amt(1: i);
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 T_ bal = 25000, min_ bal =
1000;
1. Wd_ amt(1:i)=x(1:i);
2. Am_ left(1: i) = T_ bal – wd_
amt(1:i);
3. if wd _ amt(1: i) < T_ bal
4. if Am_ left(1: i) > min_
bal
5. success_ bal(1: p) = Am_
left(1: i);
Else
6 failure _bal(1:k) = Am_
left(1:i);
7 test data(1: p) = wd_ amt(1:
i);
Source code of program Control flow graph
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 Cyclomatic complexity of graph
Cyclomatic complexity of a graph will give us the
number of independent paths.
Cyclomatic complexity can be calculated as shown
below:
 C (G) = e- n + 2g
Where
e= edges in the graph
n= number of nodes in the graph
g= number of graph
 Cyclomatic complexity of the given graph can be calculated
as shown below:
C (G) =8-7+2*1
C (G) = 1+2=3
 Cyclomatic complexity of the given graph is 3, so there are
3 independent paths in the graph.
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
Node CC
1 3
2 3
3 3
4 2
5 1
6 1
7 0
Control flow graph
Cyclomatic complexity
of each node
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 After generation of all paths in the graph, a target path is selected as
P. The goal of the test data generation problem is to find a program
input x on which path P will be traversed.
 Path P1: 123467
 Condition for Path P is A<X, B<C, D=B.
 Path P2: 123457
 Condition for Path P is A<X, B≥C, C=B.
where A=x, B=25000-x, C=1000
 Path P3:1237
Condition for Path P3:A>X,F=A;
 Target path=123457
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 This concept was used in the approach to test the Automatic Teller
Machine (ATM) withdrawal task. Test data was generated for a
single feasible path in CFG with respect to ATM withdrawal task.
The fitness function for the ATM withdrawal scenario was based on
the traversal of predicate nodes.
 Suppose a situation, withdrawal money is less than the total amount
in the account. Now, Am_ left can be less than min_ bal i.e. B < C or
Am_ left can be more than min_ bal i.e. B > C or Am_ left can be
equal to the min_ bal i.e. B = C. So taking equality condition into
consideration, B = C, B- C = 0, abs (B-C). As GA for test data
generation is minimization problem, the fitness function `f' is given
as 1= abs (B-C). But this functional value will evaluate to infinity
when B-C= 0, so to avoid this condition a small delta value (= 0:05)
is added to the fitness function
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 Hence the fitness function in general is given as:
f = 1/ ((abs (B-C) + 0.05)2)
 More general form of fitness function
f = 1/ ((abs (Am_ left - min_ bal) + 0.05)2)
Am_ left = T_ bal – wd_ amt
T_ bal= 25000
wd_ bal= x
Am_ left = 25000 – x
min_ bal=1000
 Now, the general form of fitness function used in the implementation
process is
f = 1/ ((abs (25000 –x- 1000) + 0.05)2) where 0≤x≤23900
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
 Algorithm 1 - Test Data Generation using GA
 Input: Randomly generated numbers based on the target path to be
covered.
 Output: Test data for the target path.
Begin
Gen = 0.
 while (Gen < 50) do
Step 1.) Evaluate the fitness value of each chromosome based on the
fitness function. Fitness function: f = 1/ ((abs (25000-x (i)-1000) +
0:05)2) where 0≤x≤23900
Step 2.) Use Roulette wheel as selection operator, to select the
individuals to enter into the mating pool.
Step 3.) Performed one point and two-point cross over on the
individuals in the mating pool, to generate the new population.
Step 4.) Performed bitwise Mutation on chromosomes of the new
population.
A CASE STUDY
(INTEGER TYPE TEST DATA GENERATION)
Gen = Gen + 1;
go to Step 3.
 end while
 Select the chromosome having the best fitness values which traverse
the target path and make it a feasible path, as the desired result (test
data for target path).
IMPLEMENTATION AND RESULTS
Path Proba
bility
Path
chosen
Velocity
of IWD
Time of
IWD
Change
in soil
Soil of
IWD
(1,2) 1 1,2 200.00
000001
0.045 83.1 83.1
(2,3) 1 2,3 200.00
000002
0.045 83.1 166.2
(3,4)
(3,7)
0.66
0.34
3,4 200.00
000003
0.03 91.7 257.9
(4,5)
(4,6)
0.5
0.5
4,5 200.00
000004
0.03 91.7 349.6
(5,7) 1 5,7 200.00
000005
0.03 91.7 441.3
Control flow
graph
Result for
Path exploration
IMPLEMENTATION AND RESULTS
 A Case study (Integer type Test data generation)
 Fitness function f(x) =1/ ((abs (25000-x-1000) +0.05) ^2)
 In genetic algorithm, we prefer to minimize the fitness
function. So, we have to minimize this fitness function.
f(x) x->∞ = 1/ ((abs (25000-x-1000) +0.05) ^2)
1.) for 0 ≤ x ≤ 23900, path 123457 will be traverse and it
will become a feasible path.
2.) for 24000 ≤ x ≤ 24900, path 123467 will be traverse and
it will become a feasible path.
3.) for 25000≤ x ≤ ∞, path 1237 will be traverse and it will
become a feasible path.
IMPLEMENTATION AND RESULTS
Experimental Setup
IMPLEMENTATION AND RESULTS
Results of work
IMPLEMENTATION AND RESULTS
 Fitness function
f(x) 0≤ x≤ 23900 = 1/ ((abs
(25000-x-1000) +0.05) ^2)
 When we consider the
case, no money is
withdrawn i.e.
0 ≤ x ≤ 23900,
the objective function
value is 0.0002 * 10-5.
(Single point crossover)
IMPLEMENTATION AND RESULTS
 Fitness function
f(x) 0≤ x≤ 23900 = 1/ ((abs (25000-
x-1000) +0.05) ^2)
 When we consider the case,
money is withdrawn i.e.
100 ≤ x ≤ 23900,
the objective function value is
0.0002 * 10-5.
A CASE STUDY
(STRING TYPE TEST DATA GENERATION)
 In case of random test data generation, if we want to generate data
for the string “dipen”, then it is a very long process. String “dipen”
consists of five alphabets, to have exact word “dipen”, we have to
fill five places. First place with “d”, second place with “i”, third
place with “p”, fourth place with “e” and fifth place with “n”.
 According to theory of probability, first place can be filled in 26
ways, second place with 25 ways, third place with 24, fourth place
with 23 and fifth place with 22 ways.
 Total ways = 26 *25*24*23*22= 78, 93,600 ways
 Means, we have 78, 93,600 different strings and out of these 78,
93,600 strings we have only one string named as “dipen”.
 According to theory of probability, probability of getting string
“dipen“is 1/ 78, 93,600 i.e. 1.26 *10-7.
 Chance of getting string “dipen” is very low.
 This means it is very difficult to make path P = 12356 feasible.
A CASE STUDY
(STRING TYPE TEST DATA GENERATION)
Control flow graph
A CASE STUDY
(STRING TYPE TEST DATA GENERATION)
 Result
 But in case of Genetic algorithm, the chance of getting string
“dipen” is high as compare to random search which is shown
through implementation, because genetic algorithm has its search
space and only data with high fitness value is selected, this is shown
below in snapshots .
 String “dipen” has been generated in 7 generations, this means it
takes 7 generations to make path P=12356 feasible. So, genetic
algorithm makes path P = 12356 feasible in time less than random
search.
A CASE STUDY
(STRING TYPE TEST DATA GENERATION)
0
1
2
3
4
5
6
0 2 4 6 8
Fitnessvalue
No. of generations
Fitness Value Vs No. of
generations
Fitness Value Vs No. of
generations
CONCLUSION AND FUTURE WORK
 Conclusion
Software testing is very important from the point of software
development process and test data is very important to test the
application and write efficient test cases. In the research work, I
have shown that how we can automatically generate paths of a
control flow graph which will be very useful in case of large
applications which have very complex control flow graph for
example if we have to make a control flow graph of website
www.irctc.com it will be very difficult to manual generate paths
from it one by one. In case of test data generation I have shown with
the help of results that test data whether of integer type or string,
generated with the help of genetic algorithm is more optimal than
random data generation.
 Future work
In future work can be done to generate conditions on path
automatically with the help of parsing technique or a parsing tool
and some another swarm or artificial technique can be used to
generate data and can be seen whether it is better than genetic
algorithm or not, and some work can be done to generate data of
alphanumeric type.

Más contenido relacionado

La actualidad más candente

Genetic programming
Genetic programmingGenetic programming
Genetic programmingMeghna Singh
 
Swarm Intelligence
Swarm IntelligenceSwarm Intelligence
Swarm Intelligenceshubham1306
 
Introduction to Genetic Algorithm
Introduction to Genetic Algorithm Introduction to Genetic Algorithm
Introduction to Genetic Algorithm ramyaravindran12
 
Swarm Intelligence State of the Art
Swarm Intelligence State of the ArtSwarm Intelligence State of the Art
Swarm Intelligence State of the ArtMarek Kopel
 
Swarm Intelligence - An Introduction
Swarm Intelligence - An IntroductionSwarm Intelligence - An Introduction
Swarm Intelligence - An IntroductionRohit Bhat
 
Muzammil Adulrahman ppt on travelling salesman Problem Based On Mutation Gene...
Muzammil Adulrahman ppt on travelling salesman Problem Based On Mutation Gene...Muzammil Adulrahman ppt on travelling salesman Problem Based On Mutation Gene...
Muzammil Adulrahman ppt on travelling salesman Problem Based On Mutation Gene...Petroleum Training Institute
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceSahil Kumar
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsDerek Kane
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithmszamakhan
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithmsanas_elf
 
Introduction to Evolutionary Algorithms
Introduction to Evolutionary AlgorithmsIntroduction to Evolutionary Algorithms
Introduction to Evolutionary Algorithmsherbps10
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness functionProf Ansari
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMPuneet Kulyana
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithmRespa Peter
 
Introduction to particle swarm optimization
Introduction to particle swarm optimizationIntroduction to particle swarm optimization
Introduction to particle swarm optimizationMrinmoy Majumder
 

La actualidad más candente (20)

Genetic programming
Genetic programmingGenetic programming
Genetic programming
 
Swarm Intelligence
Swarm IntelligenceSwarm Intelligence
Swarm Intelligence
 
Introduction to Genetic Algorithm
Introduction to Genetic Algorithm Introduction to Genetic Algorithm
Introduction to Genetic Algorithm
 
Swarm Intelligence State of the Art
Swarm Intelligence State of the ArtSwarm Intelligence State of the Art
Swarm Intelligence State of the Art
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Swarm Intelligence - An Introduction
Swarm Intelligence - An IntroductionSwarm Intelligence - An Introduction
Swarm Intelligence - An Introduction
 
Muzammil Adulrahman ppt on travelling salesman Problem Based On Mutation Gene...
Muzammil Adulrahman ppt on travelling salesman Problem Based On Mutation Gene...Muzammil Adulrahman ppt on travelling salesman Problem Based On Mutation Gene...
Muzammil Adulrahman ppt on travelling salesman Problem Based On Mutation Gene...
 
Genetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial IntelligenceGenetic Algorithms - Artificial Intelligence
Genetic Algorithms - Artificial Intelligence
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
Data Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic AlgorithmsData Science - Part XIV - Genetic Algorithms
Data Science - Part XIV - Genetic Algorithms
 
Genetic algorithms
Genetic algorithmsGenetic algorithms
Genetic algorithms
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Introduction to Evolutionary Algorithms
Introduction to Evolutionary AlgorithmsIntroduction to Evolutionary Algorithms
Introduction to Evolutionary Algorithms
 
Genetic algorithm fitness function
Genetic algorithm fitness functionGenetic algorithm fitness function
Genetic algorithm fitness function
 
Genetic Algorithm
Genetic AlgorithmGenetic Algorithm
Genetic Algorithm
 
MACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHMMACHINE LEARNING - GENETIC ALGORITHM
MACHINE LEARNING - GENETIC ALGORITHM
 
Modified Genetic Algorithm for Solving n-Queens Problem
Modified Genetic Algorithm for Solving n-Queens ProblemModified Genetic Algorithm for Solving n-Queens Problem
Modified Genetic Algorithm for Solving n-Queens Problem
 
Genetic algorithm
Genetic algorithmGenetic algorithm
Genetic algorithm
 
Introduction to particle swarm optimization
Introduction to particle swarm optimizationIntroduction to particle swarm optimization
Introduction to particle swarm optimization
 

Similar a Software testing

AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...cscpconf
 
An Automated Prompting System for Smart Environments
An Automated Prompting System for Smart EnvironmentsAn Automated Prompting System for Smart Environments
An Automated Prompting System for Smart EnvironmentsBarnan Das
 
Developing an Artificial Immune Model for Cash Fraud Detection
Developing an Artificial Immune Model for Cash Fraud Detection   Developing an Artificial Immune Model for Cash Fraud Detection
Developing an Artificial Immune Model for Cash Fraud Detection khawla Osama
 
Two methods for optimising cognitive model parameters
Two methods for optimising cognitive model parametersTwo methods for optimising cognitive model parameters
Two methods for optimising cognitive model parametersUniversity of Huddersfield
 
Improving the accuracy of fingerprinting system using multibiometric approach
Improving the accuracy of fingerprinting system using multibiometric approachImproving the accuracy of fingerprinting system using multibiometric approach
Improving the accuracy of fingerprinting system using multibiometric approachIJERA Editor
 
BOTNET DETECTION USING VARIOUS MACHINE LEARNING ALGORITHMS: A REVIEW
BOTNET DETECTION USING VARIOUS MACHINE LEARNING ALGORITHMS: A REVIEWBOTNET DETECTION USING VARIOUS MACHINE LEARNING ALGORITHMS: A REVIEW
BOTNET DETECTION USING VARIOUS MACHINE LEARNING ALGORITHMS: A REVIEWIRJET Journal
 
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)csandit
 
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)cscpconf
 
Software Testing Using Genetic Algorithms
Software Testing Using Genetic AlgorithmsSoftware Testing Using Genetic Algorithms
Software Testing Using Genetic AlgorithmsIJCSES Journal
 
Process mining approaches kashif.namal@gmail.com
Process mining approaches kashif.namal@gmail.comProcess mining approaches kashif.namal@gmail.com
Process mining approaches kashif.namal@gmail.comkashif kashif
 
Say "Hi!" to Your New Boss
Say "Hi!" to Your New BossSay "Hi!" to Your New Boss
Say "Hi!" to Your New BossAndreas Dewes
 
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...IOSR Journals
 
SENSOR FAULT IDENTIFICATION IN COMPLEX SYSTEMS | J4RV3I12007
SENSOR FAULT IDENTIFICATION IN COMPLEX SYSTEMS | J4RV3I12007SENSOR FAULT IDENTIFICATION IN COMPLEX SYSTEMS | J4RV3I12007
SENSOR FAULT IDENTIFICATION IN COMPLEX SYSTEMS | J4RV3I12007Journal For Research
 
Analysis on Fraud Detection Mechanisms Using Machine Learning Techniques
Analysis on Fraud Detection Mechanisms Using Machine Learning TechniquesAnalysis on Fraud Detection Mechanisms Using Machine Learning Techniques
Analysis on Fraud Detection Mechanisms Using Machine Learning TechniquesIRJET Journal
 
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systemsTMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systemsIosif Itkin
 
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular AutomataCost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automataijait
 

Similar a Software testing (20)

AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
AN ALTERNATIVE APPROACH FOR SELECTION OF PSEUDO RANDOM NUMBERS FOR ONLINE EXA...
 
An Automated Prompting System for Smart Environments
An Automated Prompting System for Smart EnvironmentsAn Automated Prompting System for Smart Environments
An Automated Prompting System for Smart Environments
 
Ijetcas14 467
Ijetcas14 467Ijetcas14 467
Ijetcas14 467
 
Developing an Artificial Immune Model for Cash Fraud Detection
Developing an Artificial Immune Model for Cash Fraud Detection   Developing an Artificial Immune Model for Cash Fraud Detection
Developing an Artificial Immune Model for Cash Fraud Detection
 
Two methods for optimising cognitive model parameters
Two methods for optimising cognitive model parametersTwo methods for optimising cognitive model parameters
Two methods for optimising cognitive model parameters
 
Da35573574
Da35573574Da35573574
Da35573574
 
Improving the accuracy of fingerprinting system using multibiometric approach
Improving the accuracy of fingerprinting system using multibiometric approachImproving the accuracy of fingerprinting system using multibiometric approach
Improving the accuracy of fingerprinting system using multibiometric approach
 
BOTNET DETECTION USING VARIOUS MACHINE LEARNING ALGORITHMS: A REVIEW
BOTNET DETECTION USING VARIOUS MACHINE LEARNING ALGORITHMS: A REVIEWBOTNET DETECTION USING VARIOUS MACHINE LEARNING ALGORITHMS: A REVIEW
BOTNET DETECTION USING VARIOUS MACHINE LEARNING ALGORITHMS: A REVIEW
 
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
 
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
AUTOMATIC THEFT SECURITY SYSTEM (SMART SURVEILLANCE CAMERA)
 
Software Testing Using Genetic Algorithms
Software Testing Using Genetic AlgorithmsSoftware Testing Using Genetic Algorithms
Software Testing Using Genetic Algorithms
 
Cerdit card
Cerdit cardCerdit card
Cerdit card
 
Process mining approaches kashif.namal@gmail.com
Process mining approaches kashif.namal@gmail.comProcess mining approaches kashif.namal@gmail.com
Process mining approaches kashif.namal@gmail.com
 
Say "Hi!" to Your New Boss
Say "Hi!" to Your New BossSay "Hi!" to Your New Boss
Say "Hi!" to Your New Boss
 
M017127578
M017127578M017127578
M017127578
 
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
Application of Genetic Algorithm and Particle Swarm Optimization in Software ...
 
SENSOR FAULT IDENTIFICATION IN COMPLEX SYSTEMS | J4RV3I12007
SENSOR FAULT IDENTIFICATION IN COMPLEX SYSTEMS | J4RV3I12007SENSOR FAULT IDENTIFICATION IN COMPLEX SYSTEMS | J4RV3I12007
SENSOR FAULT IDENTIFICATION IN COMPLEX SYSTEMS | J4RV3I12007
 
Analysis on Fraud Detection Mechanisms Using Machine Learning Techniques
Analysis on Fraud Detection Mechanisms Using Machine Learning TechniquesAnalysis on Fraud Detection Mechanisms Using Machine Learning Techniques
Analysis on Fraud Detection Mechanisms Using Machine Learning Techniques
 
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systemsTMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
TMPA-2017: Evolutionary Algorithms in Test Generation for digital systems
 
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular AutomataCost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
Cost Optimized Design Technique for Pseudo-Random Numbers in Cellular Automata
 

Último

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 

Último (20)

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 

Software testing

  • 2. INTRODUCTION  Overview  Product vs. Project  Software  Software Development  Software testing  Test cases  Test data  Manual test data  Automatic test data generation  Objective of research  White box testing  Automatic generation of paths  Automatic generation of test data
  • 3. SOFTWARE TESTING  Basic Testing process o One of the practical methods commonly used to detect the presence of errors (failures) in a computer program is to test it for a set of inputs. Our program The output is correct? I1, I2, I3, …, In, … Expected results = ? Obtained results “Inputs”
  • 4. TEST DATA  Manual test data  Data which is used to test a software or program is known as test data. We can have test data in excel sheet which can be entered manually while executing test cases .  Automatic test data  In this, test data can be read automatically from files (XML, Flat Files, Database etc.) by automation tools.
  • 5. MANUAL TEST DATA Application to test Test data in excel sheet
  • 7. WHITE BOX TESTING  Internal structure of the software  No concern with the external structure(GUI)  Types of white box testing  Statement testing  Branch testing  Path testing
  • 8. PATH TESTING  Draw the CFG using the code for which test cases have to be generated.  Determine the cyclomatic complexity of the graph.  Cyclomatic complexity provides the number of independent paths. Find a basis set of independent paths through the program control structure.  The basis set is the base for generating the test cases. Based on every independent path, choose the data such that this path is executed.
  • 9. CONTROL FLOW GRAPH  Integer i, j, k 1. read i , j , k 2. if ( i < j ) 3. if ( j < k) 4. i = k; else 5. k = i ; end if end if 6. print i , j , k end example Source code of program Control flow graph
  • 10. SWARM INTELLIGENCE  Swarm intelligence is the collective behavior of decentralized, self organized systems ,natural or artificial.  SI systems consist typically of a population of simple agents or boids interacting locally with one another and with their environment. The inspiration often comes from nature, especially biological systems. The agents follow very simple rules, and although there is no centralized control structure dictating how individual agents should behave, local, and to a certain degree random, interactions between such agents lead to the emergence of "intelligent" global behavior, unknown to the individual agents.
  • 11. SWARM INTELLIGENCE  Techniques  Ant colony optimization  Ants find the shortest path between nest and the food using pheromone trials.
  • 12. SWARM INTELLIGENCE  IWD algorithm  IWD algorithm is a new swarm-based optimization algorithm inspired from natural rivers. In a natural river, water drops move towards center of the earth, due to some gravitational force acting on it. Due to this the water drop follows the straight and the shortest path to its destination
  • 13. IWD ALGORITHM  In the proposed approach, IWD is applied over the Control Flow Graph (CFG) to obtain the number of paths available in the program. The CFG depicts the logical control flow of the program. All linearly independent paths could be obtained by CFG .Independent path is the path in the program that determines at least one new set of processing statement. In other words it introduces at least one new edge in the graph.
  • 14. ARTIFICIAL INTELLIGENCE  Artificial Intelligence (AI) or Soft computing techniques are the science, and engineering of making intelligent machines, especially intelligent computer programs.  These techniques have the ability of computer, software and firmware to do those things that we, as humans, recognize as intelligent behavior.
  • 15. ARTIFICIAL INTELLIGENCE  Techniques  Expert system  Knowledge base system  Neural networks  Evolutionary algorithms  Genetic algorithm
  • 16. GENETIC ALGORITHM  Genetic algorithms are a part of evolutionary computing, which is a rapidly growing area of artificial intelligence.  Genetic algorithms searching mechanism starts with a set of solutions called a population. One solution in the population is called a chromosome. The search is guided by a survival of the fittest principle. The search proceeds for a number of generations, for each generation the fitter solutions (based on the fitness function) will be selected to form a new population.  During the cycle, there are three main operators namely reproduction, crossover and mutation. The cycle will repeat for a number of generations until certain termination criteria are met. It could terminate after a fixed number of generations, after a chromosome with a certain high fitness value is located or after a certain simulation time.
  • 17. GENETIC ALGORITHM  Following steps gives the outline of the basic Genetic Algorithm:  [Start] Generate random population of n chromosomes (suitable solutions for the problem)  2.) [Fitness] Evaluate the fitness f(x) of each chromosome x in the population  3.) [New population] Create a new population by repeating following steps until the new population is complete a.) [Selection] Select two parent chromosomes from a population according to their fitness (the better fitness, the bigger chance to be selected) b.) [Crossover] with a crossover probability cross over the parents to form new offspring (children). If no crossover was performed, offspring is the exact copy of parents. c.) [Mutation] with a mutation probability mutate new offspring at each locus (position in chromosome). d.) [Accepting] Place new offspring in the new population  3.) [Replace] Use new generated population for a further run of the algorithm  4.) [Test] if the end condition is satisfied, stops, and returns the best solution in current population  5.) [Loop] Go to step 2
  • 18. GENETIC ALGORITHM  Representation of chromosomes  Binary  Permutation  Value  Binary Chromosome A 00011  Permutation Chromosome B 1234567  Value Chromosome C back, forward
  • 19. GENETIC ALGORITHM  Selection operators  Roulette wheel  Rank  Elitism
  • 20. GENETIC ALGORITHM  Operators of GA  Crossover  Single point crossover - one crossover point is selected, binary string from the beginning of the chromosome to the crossover point is copied from the first parent, and the rest is copied from the other parent. Chromosome A= 11110000 Chromosome B= 00001111 After single point crossover, Chromosome A= 1111000|0 Chromosome B= 0000111|1 Chromosome C= 11110001 Chromosome D=00001110
  • 21. GENETIC ALGORITHM  Two point crossover - two crossover points are selected, binary string from the beginning of the chromosome to the first crossover point is copied from the first parent, the part from the first to the second crossover point is copied from the other parent and the rest is copied from the first parent again. Chromosome A= 1111|000|0 Chromosome B= 0000|111|1 Chromosome C=11111111 Chromosome D=00000000  Mutation Bit inversion - selected bits are inverted Chromosome A= 1111000|0 Chromosome B= 11110001
  • 22. PROPOSED WORK  Test data generation using IWD and GA  Working process  Step 1.) Take an algorithm (or source code) of a program.  Step 2.) Convert the algorithm (or source code) of a program into the corresponding control flow graph.  Step 3.) Apply IWD on the control flow graph of a program. 3.1 All the independent paths present in the graph will be generated.  Step 4.) Select the target path.  Step 5.) Then use GA technique to generate the test data as input to the program which will traverse the target path.
  • 23. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  A case study has been taken, describing a customer's activity of withdrawing money from ATM.The scenario considered here for design of fitness function is that the customer tries to withdraw certain amount from the ATM machine (this withdrawal amount is the initial test data generated randomly, with an assumption that customer entering the withdrawal amount is random).
  • 24. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  Pseudo code of ATM Activity  Step 1.) Customer inserts the ATM card in the ATM machine.  Step. 2) Card number is read by the bank database.  Step 3.) Request for the pin number is generated.  Step 4.) Customer enters the pin number.  Step 5.)If pin number is correct Then Menu appears Else Enter the pin again  Step 6.) Request for the money withdrawal by the customer is entered in the ATM machine.  Step 7.) Balance request is send from ATM to the bank database.
  • 25. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  Step 8.) From bank database, amount request is send to the ATM and asks the customer to enter the withdrawal amount.  Step 9.) Customer enters the withdrawal amount and request is send to the bank database.  Step 10.) Bank database checks whether the enter amount is valid, If amount is valid, then debit process takes place Else No transaction possible.  Step 11.) If debit process takes place, response from bank database is given to the customer by dispensing cash to the customer.  Step 12.) Customer collects the money.  Step 13.) Request from database to the customer, want a receipt?  Step 14.) If Customer replies yes to the request.  Step 15.) A printed cash receipt is generated.
  • 26. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  Taking an algorithm of an ATM withdrawal activity.  T_ bal = 25000, min_ bal = 1000; 1. Wd_ amt(1:i)=x(1:i); 2. Am_ left(1: i) = T_ bal – wd_ amt(1:i); 3. if wd _ amt(1: i) < T_ bal 4. if Am_ left(1: i) > min_ bal 5. success_ bal(1: p) = Am_ left(1: i); Else 6 failure _bal(1:k) = Am_ left(1:i); 7 test data(1: p) = wd_ amt(1: i);
  • 27. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  T_ bal = 25000, min_ bal = 1000; 1. Wd_ amt(1:i)=x(1:i); 2. Am_ left(1: i) = T_ bal – wd_ amt(1:i); 3. if wd _ amt(1: i) < T_ bal 4. if Am_ left(1: i) > min_ bal 5. success_ bal(1: p) = Am_ left(1: i); Else 6 failure _bal(1:k) = Am_ left(1:i); 7 test data(1: p) = wd_ amt(1: i); Source code of program Control flow graph
  • 28. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  Cyclomatic complexity of graph Cyclomatic complexity of a graph will give us the number of independent paths. Cyclomatic complexity can be calculated as shown below:  C (G) = e- n + 2g Where e= edges in the graph n= number of nodes in the graph g= number of graph  Cyclomatic complexity of the given graph can be calculated as shown below: C (G) =8-7+2*1 C (G) = 1+2=3  Cyclomatic complexity of the given graph is 3, so there are 3 independent paths in the graph.
  • 29. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION) Node CC 1 3 2 3 3 3 4 2 5 1 6 1 7 0 Control flow graph Cyclomatic complexity of each node
  • 30. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  After generation of all paths in the graph, a target path is selected as P. The goal of the test data generation problem is to find a program input x on which path P will be traversed.  Path P1: 123467  Condition for Path P is A<X, B<C, D=B.  Path P2: 123457  Condition for Path P is A<X, B≥C, C=B. where A=x, B=25000-x, C=1000  Path P3:1237 Condition for Path P3:A>X,F=A;  Target path=123457
  • 31. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  This concept was used in the approach to test the Automatic Teller Machine (ATM) withdrawal task. Test data was generated for a single feasible path in CFG with respect to ATM withdrawal task. The fitness function for the ATM withdrawal scenario was based on the traversal of predicate nodes.  Suppose a situation, withdrawal money is less than the total amount in the account. Now, Am_ left can be less than min_ bal i.e. B < C or Am_ left can be more than min_ bal i.e. B > C or Am_ left can be equal to the min_ bal i.e. B = C. So taking equality condition into consideration, B = C, B- C = 0, abs (B-C). As GA for test data generation is minimization problem, the fitness function `f' is given as 1= abs (B-C). But this functional value will evaluate to infinity when B-C= 0, so to avoid this condition a small delta value (= 0:05) is added to the fitness function
  • 32. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  Hence the fitness function in general is given as: f = 1/ ((abs (B-C) + 0.05)2)  More general form of fitness function f = 1/ ((abs (Am_ left - min_ bal) + 0.05)2) Am_ left = T_ bal – wd_ amt T_ bal= 25000 wd_ bal= x Am_ left = 25000 – x min_ bal=1000  Now, the general form of fitness function used in the implementation process is f = 1/ ((abs (25000 –x- 1000) + 0.05)2) where 0≤x≤23900
  • 33. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION)  Algorithm 1 - Test Data Generation using GA  Input: Randomly generated numbers based on the target path to be covered.  Output: Test data for the target path. Begin Gen = 0.  while (Gen < 50) do Step 1.) Evaluate the fitness value of each chromosome based on the fitness function. Fitness function: f = 1/ ((abs (25000-x (i)-1000) + 0:05)2) where 0≤x≤23900 Step 2.) Use Roulette wheel as selection operator, to select the individuals to enter into the mating pool. Step 3.) Performed one point and two-point cross over on the individuals in the mating pool, to generate the new population. Step 4.) Performed bitwise Mutation on chromosomes of the new population.
  • 34. A CASE STUDY (INTEGER TYPE TEST DATA GENERATION) Gen = Gen + 1; go to Step 3.  end while  Select the chromosome having the best fitness values which traverse the target path and make it a feasible path, as the desired result (test data for target path).
  • 35. IMPLEMENTATION AND RESULTS Path Proba bility Path chosen Velocity of IWD Time of IWD Change in soil Soil of IWD (1,2) 1 1,2 200.00 000001 0.045 83.1 83.1 (2,3) 1 2,3 200.00 000002 0.045 83.1 166.2 (3,4) (3,7) 0.66 0.34 3,4 200.00 000003 0.03 91.7 257.9 (4,5) (4,6) 0.5 0.5 4,5 200.00 000004 0.03 91.7 349.6 (5,7) 1 5,7 200.00 000005 0.03 91.7 441.3 Control flow graph Result for Path exploration
  • 36. IMPLEMENTATION AND RESULTS  A Case study (Integer type Test data generation)  Fitness function f(x) =1/ ((abs (25000-x-1000) +0.05) ^2)  In genetic algorithm, we prefer to minimize the fitness function. So, we have to minimize this fitness function. f(x) x->∞ = 1/ ((abs (25000-x-1000) +0.05) ^2) 1.) for 0 ≤ x ≤ 23900, path 123457 will be traverse and it will become a feasible path. 2.) for 24000 ≤ x ≤ 24900, path 123467 will be traverse and it will become a feasible path. 3.) for 25000≤ x ≤ ∞, path 1237 will be traverse and it will become a feasible path.
  • 39. IMPLEMENTATION AND RESULTS  Fitness function f(x) 0≤ x≤ 23900 = 1/ ((abs (25000-x-1000) +0.05) ^2)  When we consider the case, no money is withdrawn i.e. 0 ≤ x ≤ 23900, the objective function value is 0.0002 * 10-5. (Single point crossover)
  • 40. IMPLEMENTATION AND RESULTS  Fitness function f(x) 0≤ x≤ 23900 = 1/ ((abs (25000- x-1000) +0.05) ^2)  When we consider the case, money is withdrawn i.e. 100 ≤ x ≤ 23900, the objective function value is 0.0002 * 10-5.
  • 41. A CASE STUDY (STRING TYPE TEST DATA GENERATION)  In case of random test data generation, if we want to generate data for the string “dipen”, then it is a very long process. String “dipen” consists of five alphabets, to have exact word “dipen”, we have to fill five places. First place with “d”, second place with “i”, third place with “p”, fourth place with “e” and fifth place with “n”.  According to theory of probability, first place can be filled in 26 ways, second place with 25 ways, third place with 24, fourth place with 23 and fifth place with 22 ways.  Total ways = 26 *25*24*23*22= 78, 93,600 ways  Means, we have 78, 93,600 different strings and out of these 78, 93,600 strings we have only one string named as “dipen”.  According to theory of probability, probability of getting string “dipen“is 1/ 78, 93,600 i.e. 1.26 *10-7.  Chance of getting string “dipen” is very low.  This means it is very difficult to make path P = 12356 feasible.
  • 42. A CASE STUDY (STRING TYPE TEST DATA GENERATION) Control flow graph
  • 43. A CASE STUDY (STRING TYPE TEST DATA GENERATION)  Result  But in case of Genetic algorithm, the chance of getting string “dipen” is high as compare to random search which is shown through implementation, because genetic algorithm has its search space and only data with high fitness value is selected, this is shown below in snapshots .  String “dipen” has been generated in 7 generations, this means it takes 7 generations to make path P=12356 feasible. So, genetic algorithm makes path P = 12356 feasible in time less than random search.
  • 44. A CASE STUDY (STRING TYPE TEST DATA GENERATION) 0 1 2 3 4 5 6 0 2 4 6 8 Fitnessvalue No. of generations Fitness Value Vs No. of generations Fitness Value Vs No. of generations
  • 45. CONCLUSION AND FUTURE WORK  Conclusion Software testing is very important from the point of software development process and test data is very important to test the application and write efficient test cases. In the research work, I have shown that how we can automatically generate paths of a control flow graph which will be very useful in case of large applications which have very complex control flow graph for example if we have to make a control flow graph of website www.irctc.com it will be very difficult to manual generate paths from it one by one. In case of test data generation I have shown with the help of results that test data whether of integer type or string, generated with the help of genetic algorithm is more optimal than random data generation.  Future work In future work can be done to generate conditions on path automatically with the help of parsing technique or a parsing tool and some another swarm or artificial technique can be used to generate data and can be seen whether it is better than genetic algorithm or not, and some work can be done to generate data of alphanumeric type.