JSEA  Vol.6 No.2 , February 2013
Using Genetic Algorithm as Test Data Generator for Stored PL/SQL Program Units
ABSTRACT

PL/SQL is the most common language for ORACLE database application. It allows the developer to create stored program units (Procedures, Functions, and Packages) to improve software reusability and hide the complexity of the execution of a specific operation behind a name. Also, it acts as an interface between SQL database and DEVELOPER. Therefore, it is important to test these modules that consist of procedures and functions. In this paper, a new genetic algorithm (GA), as search technique, is used in order to find the required test data according to branch criteria to test stored PL/SQL program units. The experimental results show that this was not fully achieved, such that the test target in some branches is not reached and the coverage percentage is 98%. A problem rises when target branch is depending on data retrieved from tables; in this case, GA is not able to generate test cases for this branch.


Cite this paper
M. Alshraideh, B. Mahafzah, H. Salman and I. Salah, "Using Genetic Algorithm as Test Data Generator for Stored PL/SQL Program Units," Journal of Software Engineering and Applications, Vol. 6 No. 2, 2013, pp. 65-73. doi: 10.4236/jsea.2013.62011.
References
[1]   M. G. Alshraideh and L. Bottaci, “Search-Based Software Test Data Generation for String Data Using Program-Specific Search Operators, Special Issue of Software Testing, Verification and Reliability Devoted to Extended Papers from the Third UK Testing Conference (UKTest 2005), Vol. 16, No. 3, 2006, pp. 175-203.

[2]   M. Alshraideh, B. A. Mahafzah and S. Al-Sharaeh, “A Multiple-Population Genetic Algorithm for Branch Coverage Test Data Generation,” Software Quality Control, Vol. 19, No. 3, 2011, pp. 489-513. doi:10.1007/s11219-010-9117-4

[3]   M. Alshraideh, L. Bottaci and B. A. Mahafzah, “Using Program Data-State Scarcity to Guide Automatic Test Data Generation,” Software Quality Control, Vol. 18, No. 1, 2010, pp. 109-144. doi:10.1007/s11219-009-9083-x

[4]   A. Baresel, H. Pohlheim and S. Sadeghipour, “Structural and Functional Sequence Test of Dynamic and State-Based Software with Evolutionary Algorithms,” Proceedings of the Genetic and Evolutionary Computation Conference, Chicago, 12-16 July 2003, pp. 2428-2441.

[5]   B. Korel, “Automated Test Generation for Programs with Procedures,” Proceedings of the International Symposium on Software Testing and Analysis, San Diego, 8-10 January 1996, pp. 209-215.

[6]   S. N. Sivanandam and S. N. Deepa, “Introduction to Genetic Algorithms,” 1st Edition, Springer, New York, 2010.

[7]   C. C. Michael, G. E. McGraw and M. A. Schatz, “Generating Software Test Data by Evolution,” IEEE Transactions on Software Engineering, Vol. 27, No. 12, 2001, pp. 1085-1110. doi:10.1109/32.988709

[8]   B. Korel, “Automated Software Test Data Generation,” IEEE Transactions on Software Engineering, Vol. 16, No. 8, 1990, pp. 870-879. doi:10.1109/32.57624

[9]   J. A. Edvardsson, “Survey on Automatic Test Data Generation,” Proceedings of the Second Conference on Computer Science and Engineering, Linkoping, 21-22 October 1999, pp. 21-28.

[10]   J. Duran and S. Ntafos, “An Evaluation of Random Testing,” IEEE Transactions on Software Engineering, Vol. 10, No. 4, 1984, pp. 438-444. doi:10.1109/TSE.1984.5010257

[11]   M. Harman and P. McMinn, “A Theoretical & Empirical Analysis of Evolutionary Testing and Hill Climbing for Structural Test Data Generation,” Proceedings of the 2007 International Symposium on Software Testing and Analysis, London, 9-12 July 2007, pp. 73-83. doi:10.1145/1273463.1273475

[12]   P. McMinn, “Search-Based Software Test Data Generation: A Survey: Research Articles,” Software Testing, Verification & Reliability, Vol. 14, No. 2, 2004, pp. 105-156. doi:10.1002/stvr.294

[13]   H. S. Eyal Salman, “Using Genetic Algorithm in Test Data Generation for ORACLE Named Block,” Master Thesis, The University of Jordan, Amman, 2010.

[14]   H. W. Arthur and J. Thomas, “Structured Testing: A Testing Methodology Using the Cyclomatic Complexity Metric,” National Institute of Standards, Gaithersburg, 1996.

[15]   M. Mitchell, “An Introduction to Genetic Algorithms,” 1st Edition, Massachusetts Institute of Technology, Cambridge, London 1996.

[16]   M. Srinivas and L. M. Patnaik, “Genetic Algorithms: A Survey,” IEEE Computer, Vol. 27, No. 6, 1994, pp. 17-26. doi:10.1109/2.294849

[17]   S. Kirkpatrick, C. D. Gellat and M. P. Vecchi, “Optimization by Simulated Annealing,” Science, Vol. 220, No. 4598, 1983, pp. 671-680. doi:10.1126/science.220.4598.671

[18]   S. Urman, R. Hardman and M. McLaughlin, “Oracle Database 10g Pl/SQL Programming,” 1st Edition, McGraw-Hill, New York, 2004.

[19]   A. H. Watson and T. J. McCabe, “Structured Testing: A Testing Methodology Using the Cyclomatic Complexity Metric,” NIST Special Publication, No. 500-235. National Institute of Standards and Technology, Gaithersburg, 1996.

[20]   N. J. Tracey, J. Clark, K. Mander and J. McDermid, “An Automated Framework for Structural Test-Data Generation,” Proceedings 13th IEEE Conference in Automated Software Engineering, Hawaii, 13-16 October 1998, pp. 285-288.

[21]   R. Pargas, M. Harrold and R. Peck, “Test-Data Generation Using Genetic Algorithms,” Software Testing, Verification and Reliability, Vol. 9, No. 4, 1999, pp. 263-282. doi:10.1002/(SICI)1099-1689(199912)9:4<263::AID-STVR190>3.0.CO;2-Y

[22]   J. Wegener, A. Baresel and H. Sthamer, “Evolutionary Test Environment for Automatic Structural Testing,” Information and Software Technology, Vol. 43, No. 14, 2001, pp. 841-854. doi:10.1016/S0950-5849(01)00190-2

[23]   J. Holland, “Adaptation in Natural and Artificial Systems,” University of Michigan Press, Ann Arbor, 1975.

[24]   L. Bottaci, “Predicate Expression Cost Functions to Guide Evolutionary Search for Test Data,” Genetic and Evolutionary Computation Conference (GECCO 2003), Chicago, 12-16 July 2003, pp. 2455-2464. doi:10.1007/3-540-45110-2_149

[25]   D. Whitley, “The genitor Algorithm and Selective Pressure: Why Rank-Based Allocation of Reproductive Trials Is Best,” Proceedings of the Third International Conference on Genetic Algorithms (ICGA-89), 1989, Morgan Kaufmann Publishers Inc., San Francisco, pp. 116-121.

 
 
Top