Natural language processing (NLP), as a theory-motivated computational technique, has extensive applications. Automated test case generation based on path coverage, which is a popular structural testing activity, can ...
详细信息
Natural language processing (NLP), as a theory-motivated computational technique, has extensive applications. Automated test case generation based on path coverage, which is a popular structural testing activity, can automatically reveal logic defects that exist in NLP programs and can save testing consumption. NLP programs have many paths that can only be covered by specific input variables. This feature makes conventional search-based algorithm very difficult covering all possible paths in NLP programs. A strategy is required for improving the search ability of search-based algorithms. In this paper, we propose a scatter search strategy to automatically generate test cases for covering all possible paths of NLP programs. The scatter search strategy empowers search-based algorithms to explore all input variables and cover the paths that require specific input variables within a small amount of test cases. The experiment results show that the proposed scatter search strategy can quickly cover the paths, which requires specific input variables. Many test cases and running time consumptions will be saved when search-based algorithms combine with scatter search strategy.
Context: Program synthesis tools reduce software development costs by generating programs that perform tasks depicted by some specifications. Various methodologies have emerged for program synthesis, among which searc...
详细信息
Context: Program synthesis tools reduce software development costs by generating programs that perform tasks depicted by some specifications. Various methodologies have emerged for program synthesis, among which search-based algorithms have shown promising results. However, the proliferation of search-based program synthesis tools utilising diverse searchalgorithms and input types and targeting various programming tasks can overwhelm users seeking the most suitable tool. Objective: This paper contributes to the ongoing discourse by presenting a comprehensive review of search-based approaches employed for program synthesis. We aim to offer an understanding of the guiding principles of current methodologies by mapping them to the required type of user intent, the type of searchalgorithm, and the representation of the search space. Furthermore, we aim to map the diverse searchalgorithms to the type of code generation tasks in which they have shown success, which would serve as a guideline for applying search-based approaches for program synthesis. Method: We conducted a literature review of 67 academic papers on search-based program synthesis. Results: Through analysis, we identified and categorised the main techniques with their trends. We have also mapped and shed light on patterns connecting the problem, the representation and the searchalgorithm type. Conclusions: Our study summarises the field of search-based program synthesis and provides an entry point to the acumen and expertise of the search-based community on program synthesis.
Context Transition coverage testing, a testing technique using state charts of Unified Modeling Language (UML), requires generation of transition paths that cover all transitions. However, if a generated path is infea...
详细信息
Context Transition coverage testing, a testing technique using state charts of Unified Modeling Language (UML), requires generation of transition paths that cover all transitions. However, if a generated path is infeasible due to internal variables then the transition will not be executed according to the input sequence, resulting in a test failure. Thus, feasible transition paths (FTPs) must be generated to run transition coverage tests. Objective: Several automatic transition path generation studies have been conducted using genetic algorithms (GM), but when generating a transition path using a GA, the dependent transition pairs serve as distractions. Furthermore, counter problems that require repeated execution of dependent transitions (for example, to test a failing operation of an automatic teller machine, the password must be incorrect three times) make FFP generation more difficult. Method: In this study, to address these issues, an automatic FTP generation method using a grouping GA (GGA) is described. Considering the characteristics of the problem, modification of the original GGA is proposed. A chromosome initialized using information from the state chart, and generating transition coverage, satisfied FTP while adjusting the length of the chromosome. Results: An experiment using the 'inres initiator state chart and the 'ATM' state chart generated FTPs successfully. In the case of the inres initiator state chart, the proposed GGA was shown to be capable of generating FTPs with a 100% success rate. In the case of the ATM state chart, the proposed GGA was shown to be capable of generating FTPs with a 100% success rate, by setting the maximum number of generations. Conclusion: The proposed GGA can be applied effectively to transition coverage testing using UML state charts, and can generate test paths suitable for testing purposes by setting the genetic parameter value and the maximum number of generations.
A common problem found during the integration testing is to determine an order to integrate and test the units. Important factors related to stubbing costs and constraints regarding to the software development context...
详细信息
A common problem found during the integration testing is to determine an order to integrate and test the units. Important factors related to stubbing costs and constraints regarding to the software development context must be considered. To solve this problem, the most promising results were obtained with multi-objective algorithms, however few algorithms and contexts have been addressed by existing works. Considering such fact, this paper aims at introducing a generic approach based on multi-objective optimization to be applied in different development contexts and with distinct multi-objective algorithms. The approach is instantiated in the object and aspect-oriented contexts, and evaluated with real systems and three algorithms: NSGA-II, SPEA2 and PAES. The algorithms are compared by using different number of objectives and four quality indicators. Results point out that the characteristics of the systems, the instantiation context and the number of objectives influence on the behavior of the algorithms. Although for more complex systems, PAES reaches better results, NSGA-II is more suitable to solve the referred problem in general cases, considering all systems and indicators. (C) 2014 Elsevier Inc. All rights reserved.
暂无评论