Automatic Test Improvement with DSpot: a Study with Ten Mature Open-Source Projects

11/20/2018
by   Benjamin Danglot, et al.
0

In the literature, there is a rather clear segregation between manually written tests by developers and automatically generated ones. In this paper, we explore a third solution: to automatically improve existing test cases written by developers. We present the concept, design, and implementation of a system called , that takes developer-written test cases as input (junit tests in Java) and synthesizes improved versions of them as output. Those test improvements are given back to developers as patches or pull requests, that can be directly integrated in the main branch of the test code base. We have evaluated DSpot in a deep, systematic manner over 40 real-world unit test classes from 10 notable and open-source software projects. We have amplified all test methods from those 40 unit test classes. In 26/40 cases, DSpot is able to automatically improve the test under study, by triggering new behaviors and adding new valuable assertions. Next, for ten projects under consideration, we have proposed a test improvement automatically synthesized by to the lead developers. In total, 13/19 proposed test improvements were accepted by the developers and merged into the main code base. This shows that DSpot is capable of automatically improving unit-tests in real-world, large-scale Java software.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/16/2019

RTj: a Java framework for detecting and refactoring rotten green test cases

Rotten green tests are passing tests which have, at least, one assertion...
research
02/26/2021

EvoSpex: An Evolutionary Algorithm for Learning Postconditions

Software reliability is a primary concern in the construction of softwar...
research
02/23/2021

Automating Test Case Identification in Open Source Projects on GitHub

Software testing is one of the very important Quality Assurance (QA) com...
research
06/27/2022

DeepPERF: A Deep Learning-Based Approach For Improving Software Performance

Improving software performance is an important yet challenging part of t...
research
08/16/2022

Don't Reinvent the Wheel: Towards Automatic Replacement of Custom Implementations with APIs

Reusing code is a common practice in software development: It helps deve...
research
03/24/2023

Testability Refactoring in Pull Requests: Patterns and Trends

To create unit tests, it may be necessary to refactor the production cod...
research
06/25/2020

Did You Remember to Test Your Tokens?

Authentication is a critical security feature for confirming the identit...

Please sign up or login with your details

Forgot password? Click here to reset