ArticlePDF Available

Automatic Test Data Generation using Metaheuristic Cuckoo Search Algorithm

Authors:

Abstract and Figures

The proposed work emphasizes on the automated process of test data generation for unit testing of structured programs, targeting complete path coverage of the software under test. In recent years, Cuckoo Search (CS) has been successfully applied in many engineering applications because of its high convergence rate to the global solution. The authors motivated with the performance of Cuckoo search, utilized it to generate test suits for the standard benchmark problems, covering entire search space of the input data in less iterations. The experimental results reveal that the proposed approach covers entire search space generating test data for all feasible paths of the problem in few number of generations. It is observed that proposed approach gives promising results and outperforms other reported algorithms and it can be an alternative approach in the field of test data generation.
Content may be subject to copyright.
A preview of the PDF is not available
... The popular and widely applied metaheuristic algorithms include Genetic Algorithms (GAs) [33], [73], [75], Particle Swarm Optimization algorithm (PSO) [41], [42], [59], [60], [65], Artificial Bee Colony algorithm (ABC) [25], Cuckoo Search algorithm (CS) [15], [19], [26], [35], Firefly Algorithm (FA) [11], [20], [32], [37], [46], Differential evolution (DE) algorithms [25], [29], [30], [85], Ant colony optimization(ACO) [55] etc. ...
... Separate sets of data are required for different categories of triangles like isosceles, scalene and equilateral, which is too complex to figure out manually [25]. The triangle classification problem has been used as a case study for generating test suites using metaheuristic algorithms like Cuckoo search, Particle swarm optimization etc., [22]- [26], and is already recommended as a bench mark problem in the domain of test cases and test data generation. Therefore, the triangle classification problem is used in this work as a case study to generate test suites using metaheuristic FA, DE and hybrid FA-DE algorithms. ...
Article
Full-text available
In model-based testing, the test suites are derived from design models of system specification documents instead of actual program codes to reduce cost and time of testing. In search-based software testing approach, the nature inspired meta-heuristic search algorithms are used for automating and optimizing the test suite generation process of software testing. This paper proposes a concrete model-based testing framework; using UML behavioral state chart model along with the hybrid version of the two most popular nature inspired algorithms, Firefly algorithm (FA) and Differential Algorithm (DE). The hybrid algorithm is adopted to generate optimized test suits for the benchmark triangle classification problem. Experimental results evidently show that the hybrid FA-DE search algorithm outperforms the individual model-based Firefly and Differential Evolution algorithm’s performances in terms of time complexity, better exploration and exploitation as well as variations in test case generation process. The framework generates optimized test data for complete transition path coverage of the available feasible paths of the example problem.
... Panda, Sarangi, & Dash [35] used CSA in unit testing while considering all feasible path coverage of a CFG as test adequacy criteria. The objective function used in this research article is based on edge weight based path coverage. ...
Article
Full-text available
The intention behind software testing is discovering defects in the developed software, making it error-free, robust and trustworthy. A large quantum of total efforts in the development of software is done on software testing. These efforts may include time, cost and most importantly manpower. The number of efforts required in software testing may be reduced if test data is generated automatically, without trade off the quality of the developed software. In literature, various nature inspired algorithms are used for the optimization of the software testing process. This article is a brief study on the applications of nature inspired algorithms in software testing. To keep the study succinct this study considers only two widely used testing types, structural and functional testing and literature available, since 2010 by considering only SCI or SCOPUS indexed publications.
... The technique suggested in the aforesaid approach utilizes both the neural network structure and the user-configured clustering identified with the input data for accomplishing successive learning. The cuckoo's meta-heuristic algorithm is approved to set up a few methodologies [31]. Furthermore, the use of UML diagrams is suggested for their suitability to generate test data [32,33]. ...
... The proposed approach uses the neural network structure with user-configured clustering of input data for sequential learning. There are approaches based on the meta-heuristic algorithm of the cuckoo [16]. ...
Article
Full-text available
In present paper we propose an approach to automatic generation of test data set based on application of the genetic algorithm. We consider original procedure for computation of the weights of code operations used to formulate the fitness function being the sum of these weights. Terminal objective and result of fitness function selection is maximization of code coverage by generated test data set. The idea of the genetic algorithm application approach is that first we choose the most complex branches of the program code for accounting in the fitness function. After taking the branch into account its weight is reset to zero in order to ensure maximum code coverage. By adjusting the algorithm, it is possible to ensure that the automatic test data generating algorithm finds the most distant from each other parts of the program code and, thus, the higher level of code coverage is attained. We give a detailed example illustrating the work and advantages of considered approach and suppose further improvements of the method.
... In addition to this it is found that after applying some analysis, better solutions are produced, that are feasible and reliable. This paper provides an expert system for the optimization of test case generation using genetic algorithms [10,16,17]. Similar approaches arecarried out in [11][12][13][14][15]. ...
Conference Paper
Software Quality Assurance (SQA) is a process in which the quality of software is assured by adequate software testing techniques that mainly comprise of verification and validation of the software. Software testing is the process of assessing the features of a software item and evaluating it to detect differences between given input and expected output. This process is done during the development process just prior to deployment. The SQA process is usually a manual process due to the diverse and versatile nature of the software products. That means a technique devised to test one type of software may not work that efficiently while testing another kind of software etc. Moreover, it is a time consuming process; according to a survey it consumes almost half of the total development cost and around two third of the total development time. To address the above-mentioned issues, in this research an intelligent toolkit for automated SQA is proposed and compared them with the existing famous tools like Selenium. This research focuses on automated test case/test data generation and prioritization of test cases. For this purpose, Genetic Algorithm is investigated for automatic test case generation and a fuzzy based system is proposed for test case prioritization.
Article
Full-text available
Researchers are currently seeking effective methods for automated software testing to reduce time, avoid test case redundancy, and create comprehensive test cases to cover (paths, benches, conditions, and statements). Generating a minimum number of test cases and covering all code paths is challenging in automated test case generation. Therefore, the use of optimization algorithms has become a popular trend for generating test cases to achieve many goals. In this study, we used a teaching-learning-based optimization algorithm to generate the minimum number of test cases. We compared our results with those of other state-of-the-art methods based on the path coverage for ten Java programs. The motive for using this algorithm is to optimize the number of test cases that cover all code paths in the unit test. The results emphasize that the proposed algorithm generates the minimum number of test cases and covers all paths in the code at a full-coverage rate.
Chapter
This article describes about the application of search-based techniques in regression testing and compares the performance of various search-based techniques for software testing. Test cases tend to increase exponentially as the software is modified. It is essential to remove redundant test cases from the existing test suite. Regression testing is very costly and must be performed in restricted ways to ensure the validity of the existing software. There exist different methods to improve the quality of test cases in terms of the number of faults covered, opposed to the number of statements covered in a minimum time. Different methods exist for this purpose, such as minimization, test case selection, and test case prioritization. In this article, search-based methods are applied to improve the quality of the test suite in order to select a minimum set of test cases which covers all the statements in a minimum time. The whole approach is named search based regression testing. In this paper, the performance of different metaheuristics for test suite minimization problem is also compared with a hybrid approach of ant colony optimization algorithm and genetic algorithm.
Chapter
Maximum coverage with minimum testing time is the main objective of a test case generation activity which leads to a multi-objective problem. Search-Based Testing (SBT) technique is a demanding research area for test case generation. Researchers have applied various metaheuristic (searching) algorithms to generate efficient and effective test cases in many research works. Out of these existing search-based algorithms, Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) are the most widely used algorithms in automatic test case generation. In this paper, a test case generation approach is proposed using Cuckoo Search (CS) algorithm. CS has a controlling feature, Lévy flights, which makes it more efficient in searching the best candidate solution. It helps to generate efficient test cases in terms of code coverage and execution time. In our proposed method, test cases are generated based on path coverage criteria. Fitness of a test case is evaluated using branch distance and approximation level combined functions. The result is compared with PSO and with its variant Adaptive PSO (APSO). The experimental result shows that both the algorithms give nearly equal to the same result. Though the results are nearly equal, the implementation of CS is simple as it requires only one parameter to be tuned.
Chapter
Full-text available
In recent years, a total paradigm shift has taken place towards the use of object-oriented approach in software development. Starting from banking, stock market, telecommunication, Internet applications, mobile apps and graphics to artificial intelligence, everywhere we found widespread use of object-oriented programming approach. The problem is, simpler the development of applications using object-oriented concepts, the more difficult is to test those applications due to the presence of specific features of object-oriented programming concepts like encapsulation, polymorphism, inheritance, dynamic binding, etc. Research community has already been suggested that the model-based testing approach is the most convenient and acceptable approach to test the object-oriented programs. Till date, many work has been proposed to use UML models for deriving test cases, where the testers can test the specifications and functionalities of objects and their dynamic features without accessing the program source codes. Here, we have covered the various model-based and search-based testing approaches and methodologies used by researchers in last twenty-five years to generate test cases and test data for functional as well as system-level testing of object-oriented programs. We have also provided a concrete frameworks to perform search-based testing of object-oriented programs.
Chapter
Software testing is a very vital and inevitable phase of software development for ensuring the quality and trustworthiness of software. In this work a framework has been proposed for effective testing of object oriented programs by generating test cases using UML behavioral models. The proposed technique ensures the transition coverage as well as path coverage. In this framework we have employed a hybrid simulated annealing based cuckoo search algorithm to generate optimized test cases for bench mark triangle classification problem.
Article
Full-text available
Among the software quality assurance techniques, testing stands out as one of the most frequently used techniques in practice. Consequently, testing is also widely studied in research. An important aspect in testing that receives much attention is the problem of automated test generation. This introductory paper summarizes the papers selected from the 25th IFIP International Conference on Testing Software and Systems (ICTSS 2013), which all deal with this topic. The field is briefly introduced by pointing out to some of the existing survey articles and relating the selected papers in this issue to each other and to the known body of knowledge.
Conference Paper
Search Based Software Testing (SBST) formulates testing as an optimisation problem, which can be attacked using computational search techniques from the field of Search Based Software Engineering (SBSE). We present an analysis of the SBST research agenda, focusing on the open problems and challenges of testing non-functional properties, in particular a topic we call 'Search Based Energy Testing' (SBET), Multi-objective SBST and SBST for Test Strategy Identification. We conclude with a vision of FIFIVERIFY tools, which would automatically find faults, fix them and verify the fixes. We explain why we think such FIFIVERIFY tools constitute an exciting challenge for the SBSE community that already could be within its reach.
Chapter
This chapter gives an overview of the field of model-based testing (MBT), particularly the recent advances in the last decade. It gives a summary of the MBT process, the modeling languages that are currently used by the various communities who practice MBT, the technologies used to generate tests from models, and discusses best practices, such as traceability between models and tests. It also briefly describes several findings from a recent survey of MBT users in industry, outlines the increasingly popular use of MBT for security testing, and discusses future challenges for MBT.
Conference Paper
We propose to use Search-Based Software Engineering to automatically evolve coverage criteria that are well correlated with fault revelation, through the use of existing fault databases. We explain how problems of bloat and overfitting can be ameliorated in our approach, and show how this new method will yield insight into faults — as well as better guidance for Search-Based Software Testing.
Conference Paper
Software testing is accounted to be an essential part in software development life cycle in terms of cost and manpower, where its total cost is considerable high. Consequently, many studies [78] have been conducted to minimize the associated cost and human effort to fix bugs and errors, and to improve the quality of testing process by automatically generating test cases. Test cases can be generated from different phases (requirement phase, design phase and after development phase). Though, test case generation at early stages is more effective rather than that after development, where time and effort used for finding and fixing errors and bugs is less than that after development. At later stage, fixing errors results in enormous code correction, consuming a lot of time and effort. In this paper, we study the different paradigms of testing techniques for generating test cases, where we investigate their coverage and associated capabilities. We finally propose a preliminary model for a generic automated test cases generation.
Article
The aim of this paper is to generate test sequences for object-oriented software with composite states using state machines. This experimental work in software testing focuses on generating test sequences using the proposed algorithm called SMTSG (State Machine to Test Sequence Generation). This work also describes the effectiveness of test sequences by using mutation analysis. Our approach considers nine types of state faults for checking the efficiency of the generated test sequences. The effectiveness of the prioritized test sequences is shown using Average Percentage Fault Detection (APFD) metric. The experimental results show that the test sequences generated using our proposed approach are more efficient than the existing approaches.
Conference Paper
This paper1 presents a survey of work on Search Based Software Engineering (SBSE) for Software Product Lines (SPLs). We have attempted to be comprehensive, in the sense that we have sought to include all papers that apply computational search techniques to problems in software product line engineering. Having surveyed the recent explosion in SBSE for SPL research activity, we highlight some directions for future work. We focus on suggestions for the development of recent advances in genetic improvement, showing how these might be exploited by SPL researchers and practitioners: Genetic improvement may grow new products with new functional and non-functional features and graft these into SPLs. It may also merge and parameterise multiple branches to cope with SPL branchmania.
Article
For the development of high quality systems, software testing has been used as a way to help software engineers. Selection of a software testing technique is an important research issue in software engineering community. Verification and validation activities are conducted to enhance the software quality throughout the entire life cycle of software development. The success rate of software system depends upon the type of software testing techniques that we employ at the time of software testing process. In literature, we have identified different types of software testing techniques like, black box techniques, white box techniques, and gray box techniques etc.; and choosing one of them is not an easy task according to need/ criteria of the software projects because each technique pursues a specific objective or goal; and is less suitable for specific kind of software system. Therefore, in order to address this issue, we present a method for the selection of software testing techniques using analytic hierarchy process (AHP) by considering the following criteria: New or modified system (NMS), Number of independent paths (NIP), Number of test cases (NTC), and Cost of requirements (CoR). Finally, the utilization of the proposed approach is demonstrated with the help of an example.