An Approach and Benchmark to Detect Behavioral Changes of Commits in Continuous Integration
Authors:
- Benjamin DanglotBDBenjamin Danglot
- Martin MonperrusMMMartin Monperrus
- Walter RudametkinWRWalter Rudametkin
- Benoit BaudryBBBenoit Baudry
Preprint
Abstract
When a developer pushes a change to an application's codebase, a good practice is to have a test case specifying this behavioral change. Thanks to continuous integration (CI), the test is run on subsequent commits to check that they do no introduce a regression for that behavior. In this paper, we propose an approach that detects behavioral changes in commits. As input, it takes a program, its test suite, and a commit. Its output is a set of test methods that capture the behavioral difference between the pre-commit and post-commit versions of the program. We call our approach DCI (Detecting behavioral changes in CI). It works by generating variations of the existing test cases through (i) assertion amplification and (ii) a search-based exploration of the input space. We evaluate our approach on a curated set of 60 commits from 6 open source Java projects. To our knowledge, this is the first ever curated dataset of real-world behavioral changes. Our evaluation shows that DCI is able to generate test methods that detect behavioral changes. Our approach is fully automated and can be integrated into current development processes. The main limitations are that it targets unit tests and works on a relatively small fraction of commits. More specifically, DCI works on commits that have a unit test that already executes the modified code. In practice, from our benchmark projects, we found 15.29% of commits to meet the conditions required by DCI.Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- Automatic test improvement with DSpot: a study with ten mature open-source projectsEmpirical Software Engineering, 2019
- A comprehensive study of pseudo-tested methodsEmpirical Software Engineering, 2018
- Shadow Symbolic Execution for Testing Software PatchesACM Transactions on Software Engineering and Methodology, 2018
- Shadow Symbolic Execution with Java PathFinderACM SIGSOFT Software Engineering Notes, 2018
- Including Performance Benchmarks into Continuous Integration to Enable DevOpsACM SIGSOFT Software Engineering Notes, 2015
- Differential assertion checking2013
- KATCH: high-coverage testing of software patches2013
- Test data regeneration: generating new test data from existing test dataSoftware Testing, Verification and Reliability, 2010
- JPF–SE: A Symbolic Execution Extension to Java PathFinder2007
- Software testability: the new verificationIEEE Software, 1995