Dynamic Analysis can be Improved with Automatic Test Suite Refactoring

Jifeng Xuan 1 Benoit Cornu 2, 1 Matias Martinez 2, 1 Benoit Baudry 3 Lionel Seinturier 2, 1 Martin Monperrus 2, 1
1 SPIRALS - Self-adaptation for distributed services and large software systems
Inria Lille - Nord Europe, CRIStAL - Centre de Recherche en Informatique, Signal et Automatique de Lille - UMR 9189
3 DiverSe - Diversity-centric Software Engineering
Inria Rennes – Bretagne Atlantique , IRISA-D4 - LANGAGE ET GÉNIE LOGICIEL
Abstract : Context: Developers design test suites to automatically verify that software meets its expected behaviors. Many dynamic analysis techniques are performed on the exploitation of execution traces from test cases. However, in practice, there is only one trace that results from the execution of one manually-written test case. Objective: In this paper, we propose a new technique of test suite refactoring, called B-Refactoring. The idea behind B-Refactoring is to split a test case into small test fragments, which cover a simpler part of the control flow to provide better support for dynamic analysis. Method: For a given dynamic analysis technique, our test suite refactoring approach monitors the execution of test cases and identifies small test cases without loss of the test ability. We apply B-Refactoring to assist two existing analysis tasks: automatic repair of if-statements bugs and automatic analysis of exception contracts. Results: Experimental results show that test suite refactoring can effectively simplify the execution traces of the test suite. Three real-world bugs that could previously not be fixed with the original test suite are fixed after applying B-Refactoring; meanwhile, exception contracts are better verified via applying B-Refactoring to original test suites. Conclusions: We conclude that applying B-Refactoring can effectively improve the purity of test cases. Existing dynamic analysis tasks can be enhanced by test suite refactoring.
Type de document :
Pré-publication, Document de travail
2015
Liste complète des métadonnées

https://hal.archives-ouvertes.fr/hal-01162220
Contributeur : Martin Monperrus <>
Soumis le : mardi 9 juin 2015 - 20:16:35
Dernière modification le : mercredi 2 août 2017 - 10:10:57

Identifiants

  • HAL Id : hal-01162220, version 1
  • ARXIV : 1506.01883

Citation

Jifeng Xuan, Benoit Cornu, Matias Martinez, Benoit Baudry, Lionel Seinturier, et al.. Dynamic Analysis can be Improved with Automatic Test Suite Refactoring. 2015. 〈hal-01162220〉

Partager

Métriques

Consultations de la notice

545