Doctoral thesis

Automatic test suite evolution


114 p

Thèse de doctorat: Università della Svizzera italiana, 2012

English Software testing is one of the most common approaches to verify software systems. Despite of many automated techniques proposed in the literature, test cases are often generated manually. When a software system evolves during development and maintenance to accommodate requirement changes, bug fixes, or functionality extensions, test cases may become obsolete, and software developers need to evolve them to verify the new version of the software system. Due to time pressure and effort required to evolve test cases, software developers do not update test cases often and many test cases become quickly obsolete. As a consequence, the effectiveness of the test suites drops over time. In this thesis, we propose a new technique for automating test suite evolution aiming to reduce both the developers effort and the costs of software evolution. To understand the evolution of test cases, we conducted an empirical study on real-world software systems to gain an insight on how software developers evolve the test cases. Our study shows that many test cases of software systems are similar. These similarities lead developers to follow common activities for repairing and generating test cases by using some common processes. Based on this observation, we identify some of Test Reuse Patterns that can be applied to fix many test cases and generate new test cases. In this thesis we define five Test Reuse Patterns: change of method declaration, extension of class hierarchy, implementation of interface, introduction of overloaded methods, and introduction of overridden methods. We propose a framework for generating and repairing test cases for evolving software by automating Test Reuse Patterns. The framework, called Test Care Assistant (TCA), repairs test cases that do not compile after the code changes and generates test cases when new classes or methods are added to the software. We evaluated TCA on several open-source projects, and the results suggest that TCA can be successfully adopted in software testing process to help software developers evolve the test cases with less effort and time. The empirical evaluation of the framework shows that TCA can be successfully applied in many cases and that the effectiveness of the test cases generated and repaired by TCA is comparable with the effectiveness of the test cases written manually by software developers and generated automatically by existing techniques. This dissertation makes several contributes to the state of the art. First, it introduces Test Reuse Patterns, Second, it proposes a framework, TCA, that exploits the Test Reuse Patterns to repair and evolve test cases in the software, Third, it performs an empirical study of software evolution conducted on different test suite repositories, Fourth, it implements the TCA prototype, and Finally it performs an empirical evaluation of the applicability and effectiveness of the approach on open-source projects.
  • English
Computer science and technology
License undefined
Persistent URL

Document views: 101 File downloads:
  • 2012INFO006.pdf: 119