Академический Документы
Профессиональный Документы
Культура Документы
Available at http://www.ijcsonline.com/
Abstract
The most striking feature of SDLC is software testing. It is very labour-intensive and expensive process in software
development and handling as well as maintenance of software. The main objective of this paper is to extend the testing
technique. Testing is to show the incorrectness and is considered to succeed when an error is detected [Myers79].
Todays automatic testing has replaced manual testing with a great extent. Automating testing is very helpful in reducing
human efforts to generate test cases or test data. Test data or test case is a very tiresome task in software testing. It has
multiple set of values or data that are used to test the functionality of a particular feature. All degrees of the test values
and conditions maintained in separate files and stored as test data. Test case or data generation is a set of conditions or
rules that are developed for finding the failure points in a developing software. Nowadays, many researches have paid
considerable attention, focusing on test data generation techniques. This paper adopts a case study and proposes a
technique for test data generation, based on genetic algorithm using critical path. Critical path testing is considered to
solve the looping problem and improving the testing efficiency. Test data scenario is derived from sequence diagram.
Sequence diagram reveals the sequence of calls in a system using exchange of messages among the objects of system.
Keywords: Genetic Algorithm, UML, Sequence diagram and graph, Test-data generation.
I.
INTRODUCTION
RELATED WORK
131 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016
Anju Bala et al
Automatic Test Data Generation using Genetic Algorithm using Sequence Diagram
UML
132 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016
Anju Bala et al
Automatic Test Data Generation using Genetic Algorithm using Sequence Diagram
the
population;
/*generate
the
initial
End
End
The basic steps of genetic algorithm a shown in this step:
GENETIC ALGORITHM
A. INTRODUCTION
Genetic Algorithm is based on natural phenomena. The
fundamental concept behind GAs is natural selection and
genetic inheritance. The founder of GA is John Holland,
university of Michigan (1970) in U.S.A developed a
remarkable idea in the field of heuristic search. It is based
on the evolutionary principle. GA belongs to the class of
probabilistic algorithm. GA empirically provides directed
search algorithms rely on the mechanics of biological
evolution. The best part behind to use GA than other
133 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016
Anju Bala et al
Automatic Test Data Generation using Genetic Algorithm using Sequence Diagram
2.
V.
PROPOSED APPROACH
Algorithm:
1.
2.
3.
4.
5.
6.
7.
8.
End
134 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016
Anju Bala et al
Automatic Test Data Generation using Genetic Algorithm using Sequence Diagram
: Patient
: Receptionist
: Doctor
: Nurse
Take Appointment
Check Appointment
Cannot meet
Consult Doctor
Check Patient
Patient Ok
VI.
CASE STUDY
Patient OK
If not OK appoint again
Treat again
Leave
135 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016
Anju Bala et al
Automatic Test Data Generation using Genetic Algorithm using Sequence Diagram
Node
3
5
8
9
10
11
13
14
Fig 4. Sequence graph of online-appointment.
Now critical path is determine by stack weight
assignment approach as shown below in this table:
Table 1. Critical path is determined
Path
followed by
node, k
Fitness
value= a+b
12
12
0*1=0
11,8,6,4
1*2=2
13,10,8,
6
Node
Informati
on Flow, b
4
6
12
Popping
operation, a
Stack
size, smax
Weight=
smax-k
12
11
10
4,12
5,6
7,12
8,13
9,14
10
11,12,
10
13,14
10
11
14
11
12
13
10
1*1=1
11
1*2=2
11
2*1=2
10
1*1=1
1*1=1
1*2=2
1*1=1
10
1*2=2
11
6,3
1*1=1
7,4
12
7,5,3
2*2=4
11,9,7
13
1*1=1
14
1*1=1
F(x)
Pi
Ci
1000
99
0.2757
0.2757
0.245
1010
95
0.2646
0.5403
0.257
1111
89
0.2479
0.7882
0.667
0000
76
0.2116
0.9998
.9999
136 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016
Anju Bala et al
Automatic Test Data Generation using Genetic Algorithm using Sequence Diagram
Selectio
n
1000
Crossov
er point
Crossov
er
Mutatio
n
F(x
)
1000
1000
99
1000
1010
1010
95
1010
1011
1011
72
1111
1011
1011
95
S.No.
F(X)
Pi
Ci
1000
99
0.2525
0.2525
0.345
1000
99
0.2525
0.505
0.624
1000
99
0.2525
0.7575
0.867
1010
95
0.2423
0.9998
0.894
Pi
Ci
S.
N
Selecti
on
Crossover
point
Crossover
Mutation
F(x)
S.No
1000
99
0.2742
0.2742
0.2622
1 1000
1000
1000
99
1010
95
0.2631
0.5373
0.1240
2 1000
1000
1000
99
1011
72
0.1994
0.7367
0.8760
3 1000
1000
1000
99
1010
95
0.2631
0.9998
0.6790
4 1010
1010
1000
99
Selectio
n
Crossove
r point
Crossove
r
Mutatio
n
F(
X)
1010
1010
1000
99
1000
1000
1010
95
1011
1011
1111
89
1011
1010
1000
99
F(X)
Pi
Ci
S.No
1
1000
99
0.2591
0.2591
0.2486
1010
95
0.2486
0.5077
0.4706
1111
89
0.2329
0.7406
0.6880
1000
99
0.2591
0.9997
0.8990
Selectio
n
Crossove
r point
Crossove
r
Mutatio
n
F(
X)
1010
1010
1000
99
1011
1000
1000
99
1011
1000
1000
99
1010
1010
1010
95
VII. CONCLUSION
This paper presents the test data generation by using
UML sequence diagram. Genetic algorithm is used for
selection of those test data that have highest fitness value.
Roulette Wheel Selection is used to select next test data.
Stack based weight approach is used to calculate critical
path in graph. Genetic Algorithm technique also helps in
increasing the software testing efficiency and GA also
useful to solve trivial problem. Operators (mutation and
crossover) are the best to pruning the population and give
best individual. In future, we try our best to find more
convenient way to make easy in generation of test data and
test cases. Operators of genetic algorithm that can apply on
137 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016
Anju Bala et al
Automatic Test Data Generation using Genetic Algorithm using Sequence Diagram
REFERENCES
R. Blanco, J.Tuya and B. Adenso-Daz, Automated test data
generation using scatter-search approach, Information and
Software technology, vol. 51, Issue 4, (2009), pp. 708-720.
[2] Xanthakis S, Ellis C,Skourlas C, Le Gall A, Application of
Genetic algorithms to Software Testing. In 5th International
Conference on Software Engineering and its Applications pp. 625636.
[3] T. Blickle, L. Thiele, A Comparison of Selection Schemes used in
Genetic Algorithms. TIK-Report, Zurich, 1995.
[4] B. N. Biswal, S. S. Barpanda and D. P. Mohapatra, International
Journal of Computer Applications, vol. 1, Issue 14, (2010).
[5] Bo Zhang, Chen Wang, Automatic Generation of Test Data for
Path Testing by Adaptive Genetic Simulated Annealing
Algorithm, IEEE, 2011, pp. 38-42.
[6] M. A. Ahmed, I. Hermadi, Genetic Algorithm based multiple
paths test data generator, Computer and operations Research
(2007).
[7] Parveen Ranjan Srivastava, Tai-hoon Kim, Application of Genetic
Algorithm in Software Testing, International Journal of Software
engineering and its Application, Vol. 3, No.4, October 2009, pp.
87-95.
[8] Snageeta Sabharwal, Ritu Sibal, Chanyanika Sharma,
Prioritization of test cases scenarios derived from activity diagram
using genetic algorithm, ICCCT, IEEE, 2010, pp. 481-485.
[9] Sangeeta Sabharwal et al., Applying Genetic algorithm for
Prioritization of test cases Scenario derived from UML diagrams,
International journal of computer science, Vol.8, Issue 3, No.2,
May 2011.
[10] Sultan H. Alijahdali et al, The Limitation of Genetic Algorithm in
Software Testing, pp. 1-8.
[11] V. Mary Sumalatha, G.S.V.P. Raju, Object Oriented Test Cases
Generation Techniques using Genetic Algorithms, International
Journal of Computer Applications Vol. 61- No.20, January 2013, pp
20-26.
[1]
138 | International Journal of Computer Systems, ISSN-(2394-1065), Vol. 03, Issue 02, February, 2016