Tuesday , December 11 2018

A Genetic Algorithm-based System for
Automatic Control of Test Data Generation

Paul POCATILU, Ion IVAN
Bucharest University of Economic Studies
Piata Romana 6, Bucharest, Romania
ppaul@ase.ro, ionivan@ase.ro

Abstract: Software testing is an important process that helps to develop high quality software. This process is more time consuming when applied to control systems. This involves the use of several testing strategies, techniques and methodologies. At the module level one of test technique is to assure as much as possible code coverage. This is accomplished using several methods, one of them being automatic test data generation. Test data generation can be done manually, randomly or using combinatorial optimizing techniques. Another technique involves the use of genetic algorithm (GA). The paper presents a system that involves an automatic control of test data generation. It also provides implementation details of a test data generator (TDG) based on GA that uses a specific fitness function called Inverse Similarity of Coverage (ISC). The test data generator is a module of the proposed system. The results show that the proposed solution, GA-TDG, has far better results in many relevant situations than random test generators regarding the number of software under test (SUT) runs.

Keywords: Software testing process, control system, genetic algorithm, test data generation, fitness function, code coverage, random data generation, control decision.

>>Full Text
CITE THIS PAPER AS:
Paul POCATILU, Ion IVAN, A Genetic Algorithm-based System for Automatic Control of Test Data Generation, Studies in Informatics and Control, ISSN 1220-1766, vol. 22 (2), pp. 219-226, 2013.

Introduction

One of the most important goals for software providers is to deliver high quality software to customers, especially if the software is embedded in a real-time, a control system or a safety critical system. Software quality involves many processes like software testing [1], [3], [5] and software metrics collection and analysis, according to [14].

Software testing processes target the study of software stability as a systemic approach. The management of these processes is influenced by various factors, and it is very important to identify the processes that can be optimized and have a better control over them.

The software embedded in control systems is implemented using algorithms with different levels of complexity. Regardless of their complexity, the software has to be tested applying several strategies.

Every control system requires a rigorous testing. The software embedded in a control system has to be tested thoroughly before going in production. One important step in testing is test data generation.

Test data generators (TDG) work based on the internal structure of the software under test. TDGs require source code access or code execution results supplied by instrumentation and execute the software in a simulator or on the device. Data set generation processes are time consuming, even these processes are automated. A possible solution that optimizes these processes involves the use of genetic algorithms (GA) in test data generators. By using GA the required level of coverage for code execution or states activation can be achieved having a better control using the input parameters.

Usually, TDGs use the associated control flow graph (CFG), control flow diagram (CFD) or tree of the program in order to produce test data. Software metrics are strongly related to analysis of test data generators in order to improve them and to find better solutions.

Test data generators are built so large variations of input data sets will influence in a similar way the program behavioral characteristics (duration, number of segment covered etc.).The stability and predictability of TDG are very important for testing system control. That means that we could approximate the duration of test data generation process based on the inputs (programs, CFG, CFD, constraints etc.).

The objective of this paper is to highlight the benefits of our proposed solution that can be implemented for any control system.

The paper is structured as follows.

The section Software Testing Process and Test Data Generation presents the main software testing strategies, focusing on structural testing. Also, in this section test data generators are analyzed.

The GA-TDG Solution section deals with the description of the dedicated module within the system based on genetic algorithm. The section analyzes the fitness function and details the practical implementation of our genetic algorithm. Here are presented the resulted solution GA-TDG and the solution used for random test generation, RND-TDG.

These sections include references to previous works in approached areas.

In the Experimental Results section, we present data collected after several runs of the GA-TDG compared with the results collected from the RND-TDG.

Discussions section analyzes the results of our algorithm.

The paper ends with conclusions and future work for this current research.

REFERENCES

  1. BEIZER, B., Software Testing Techniques – Second Edition, Van Nostrad Reinhold, New York, 1990.
  2. BORGELT, K., Software Test Data Generation from a Genetic Algorithm, Industrial Applications of Genetic Algorithms, Ed. By Charles L. Karr and L. Michael Freeman, CRC Press, Boca Raton, 1999, pp. 49-68.
  3. IVAN, I., P. POCATILU, Testarea software orientat obiect, Inforec Publishing House, Bucharest, 1999.
  4. MICHAEL, C. C., G. E. MCGRAW, M. A. SCHATZ, C. C. WALTON, Genetic Algorithms for Dynamic Test Data Generation, In Proc. of IEEE International Automated Software Engineering Conference (ASE97), Nov. 3-5, 1997, pp. 307-308.
  5. MEYERS, G. J., The Art of Software Testing, Second Edition, John Wiley & Sons, New Jersey, 2004.
  6. ROPER, M., Software Testing, McGraw-Hill Book, 1994.
  7. POCATILU, P., T. MIHAI, D. CAZAN, Test Data Generation Using Genetic Algorithms, Proceeding of the Workshop on Evolutionary Algorithms, Bucharest, 2001.
  8. POCATILU, P., T. MIHAI, An Evolutionary Method for Test Data Generation, Proc. of the Fifth Symposium on Economic Informatics, May 10-13, 2001, Bucharest, pp. 761-764.
  9. PARGAS, R. P., M. J. HARROLD, R. R. PECK, Test-Data Generation Using Genetic Algorithms, Software Testing, Verification And Reliability, vol. 9(4), 1999, pp.263-282.
  10. SRIVASTAVA, P. R., T.-H. KIM, Application of Genetic Algorithm in Software Testing, International Journal of Software Engineering and Its Applications, vol. 3(4), 2009, pp. 87-95.
  11. NELSON, R. C., Overview of Genetic Algorithms, 1999. http://www.cs.rochester.edu/~nelson/courses/csc_173/genetic-algs/algorithm.html
  12. VISOIU, A., Deriving Trading Rules Using Gene Expression Programming, Informatica Economica, vol. 15(1) 2011, pp. 22-30.
  13. McCABE, J. T., A Complexity Measure, IEEE Transaction on Software Engineering, vol. SE-2, no. 4, Dec. 1976, pp. 308-320.
  14. BOJA, C., L. BATAGAN, Analysis of m-Learning Applications Quality, WSEAS Transactions on Computers, vol. 8(5), 2009, pp. 767-777.
  15. BALOG, A., C. PRIBEANU, Developing a Measurement Scale for the Evaluation of AR-Based Educational Systems, Studies in Informatics and Control, Vol. 18, No. 2, June 2009, pp. 137-148.
  16. MALHOTRA, R., M. GARG, An Adequacy Based Test Data Generation Technique Using Genetic Algorithms, Journal of Information Processing Systems, vol.7(2), 2011, pp. 363-384.
  17. SUDUC, A. M., M. BÎZOI, F. G. FILIP, User Awareness about Information Systems Usability, Studies in Informatics and Control, vol. 19(2), 2010, pp. 145-152.
  18. KHAMIS, A. M., M. R. GIRGIS, A. S. GHIDUK, Automatic Software Test Data Generation for Spanning Sets Coverage Using Genetic Algorithms, Computing and Informatics, vol. 26, 2007, pp. 383-401.
  19. HAUPT, R. L., S. E. HAUPT, Practical Genetic Algorithms, Second Edition, John Wiley & Sons, Inc., Hoboken, New Jersey, 2004.
  20. SHIMIN, L., L. ZHANGANG, Genetic Algorithm and its Application in the Path-oriented Test Data Automatic Generation, Procedia Engineering, vol. 15, 2011, pp. 1186-1190.

https://doi.org/10.24846/v22i2y201312