scholarly journals Supporting Unit Test Generation via Automated Isolation

Author(s):  
Dávid Honfi ◽  
Zoltán Micskei

Testing is a significantly time-consuming, yet commonly employed activity to improve the quality of software. Thus, techniques like dynamic symbolic execution were proposed for generating tests only from source code. However, current approaches usually could not create thorough tests for software units with dependencies (e.g. calls to file system or external services). In this paper, we present a novel approach that synthesizes an isolation sandbox, which interacts with the test generator to increase the covered behaviour in the unit under test. The approach automatically transforms the code of the unit under test, and lets the test generator choose values for parameters in the calls to dependencies. The paper presents a prototype implementation that collaborates with the IntelliTest test generator. The automated isolation is evaluated on source code from open-source projects. The results show that the approach can significantly increase the code coverage achieved by the generated tests.

2015 ◽  
Vol 66 (4) ◽  
pp. 185-193 ◽  
Author(s):  
Ján Hudec ◽  
Elena Gramatová

Abstract The paper presents a new functional test generation method for processors testing based on genetic algorithms and evolutionary strategies. The tests are generated over an instruction set architecture and a processor description. Such functional tests belong to the software-oriented testing. Quality of the tests is evaluated by code coverage of the processor description using simulation. The presented test generation method uses VHDL models of processors and the professional simulator ModelSim. The rules, parameters and fitness functions were defined for various genetic algorithms used in automatic test generation. Functionality and effectiveness were evaluated using the RISC type processor DP32.


2013 ◽  
Vol 29 (7) ◽  
pp. 1758-1773 ◽  
Author(s):  
Ting Chen ◽  
Xiao-song Zhang ◽  
Shi-ze Guo ◽  
Hong-yuan Li ◽  
Yue Wu

2012 ◽  
Vol 201-202 ◽  
pp. 242-245
Author(s):  
Xiao Li Ji ◽  
Xiao Song Zhang ◽  
Ting Chen ◽  
Xiao Shan Li ◽  
Lei Jiang

Dynamic symbolic execution is a promising approach for software analyzing and testing. However, it fails to scale to large programs due to the exponential number of paths to be explored. This paper focus on tackling loop caused path explosion problems and proposes a new approach to reduce paths that produce the same effects. We present a loop transparency strategy that makes use of the decision graph of under test program to discard constraints that produce paths with only a different number of iterations. A dynamic software testing tool LTDse based on loop transparency is designed and evaluated on three benchmarks. The experimental results show that our approach is effective since it can achieve better code coverage or require fewer program executions than traditional strategies.


Author(s):  
Atish Kumar Dipongkor ◽  
Iftekhar Ahmed ◽  
Rayhanul Islam ◽  
Nadia Nahar ◽  
Abdus Satter ◽  
...  

Move Method Refactoring (MMR) is used to place highly coupled methods in appropriate classes for making source code more cohesive. Like other refactoring techniques, it is mandatory that applying MMR will preserve applications’ behaviors. However, traditional MMR techniques failed to meet this essential precondition for Action methods in web-based application and API methods in libraries projects. The reason is that applying MMR on these methods changes the behaviors of the projects by raising Application-breaking issues, for instance, failure of browser requests and compilation errors in client projects. To resolve this problem, developers are suggested to manually check Action and API methods while applying MMR. However, manually inspecting thousands of lines of code for these issues is a time-consuming and hectic task. In this paper, an advanced MMR technique is proposed which automatically identifies Application-breaking MMR suggestions. This technique first takes the initial move method suggestions from the existing prominent MMR techniques e.g. JDeodorant. For each of the suggestions, it parses the source code and construct Abstract Syntax Tree to examine two types of usage. One is whether a suggestion has not been used in any unit test and Regular Class, and another is whether the suggestion has been used in unit test classes only. If any MMR suggestion is found having one of these two types of usage or both, the respective suggestion is marked as Application-breaking. In order to evaluate the proposed technique, several experiments have been conducted on open source projects. The experimental results show that the proposed technique achieved 96.4% Precision, 90% Recall and 93.1% F-score in detecting Application-breaking MMR suggestions, because of considering external dependencies of the MMR suggestions.


2021 ◽  
Vol 206 ◽  
pp. 102608
Author(s):  
Weigang He ◽  
Jianqi Shi ◽  
Ting Su ◽  
Zeyu Lu ◽  
Li Hao ◽  
...  

2020 ◽  
Vol 10 (17) ◽  
pp. 6038 ◽  
Author(s):  
Musaad Alzahrani ◽  
Saad Alqithami

A commonly observed ambiguity of a class is simply a reflection of multiple methods’ implementation within an individual class. The process of Extract Class refactoring is, therefore, used to separate the different responsibilities of a class into different classes. A major limitation in existing approaches of the Extract Class refactoring is based on factors that are internal to the class, i.e., structural and semantic relationships between methods, in order to identify and separate the responsibilities of the class which are inadequate in many cases. Thus, we propose a novel approach that exploits the clients of the class to support the Extract Class refactoring. The importance of this approach lies in its usefulness to support existing approaches since it involves factors external to the class, i.e., the clients. Moreover, an extensive empirical evaluation is presented to support the proposed method through the utilization of real classes selected from two open source systems. The result shows the potential of our proposed approach and usefulness that leads to an improvement in the quality of the considered classes.


Author(s):  
Lingming Zhang ◽  
Tao Xie ◽  
Lu Zhang ◽  
Nikolai Tillmann ◽  
Jonathan de Halleux ◽  
...  

Sign in / Sign up

Export Citation Format

Share Document