Small-Amp: Test Amplification in a Dynamically Typed Language

08/12/2021
by   Mehrdad Abdi, et al.
0

Test amplification is a novel technique which extends a manually created test suite with additional test cases to increase the code coverage. The technique is effective, in the sense that it suggests strong and understandable test cases, generally adopted by software engineers. Unfortunately, the current state-of-the-art for test amplification heavily relies on program analysis techniques which benefit a lot from explicit type declarations present in statically typed languages. In dynamically typed languages, such type declarations are not available and as a consequence test amplification has yet to find its way to programming languages like Smalltalk, Python, Ruby and Javascript. We propose to exploit profiling information -readily obtainable by executing the associated test suite- to infer the necessary type information creating special test inputs with corresponding assertions. We evaluated this approach on 52 selected test classes from 13 mature projects in the Pharo ecosystem contain- ing approximately 400 test methods. We show the improvement in killing new mutants and mutation coverage in 33 out of 52 test classes (63 13 pull-requests submitted were merged into the main code base (76 results are comparable to the state-of-the-art, hence we conclude that test amplification is feasible for dynamically typed languages.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/21/2021

AmPyfier: Test Amplification in Python

Test Amplification is a method to extend handwritten tests into a more r...
research
11/09/2021

An Empirical Study of Automated Unit Test Generation for Python

Various mature automated test generation tools exist for statically type...
research
02/14/2020

Lightweight Lexical Test Prioritization for Immediate Feedback

The practice of unit testing enables programmers to obtain automated fee...
research
08/26/2021

Code Coverage and Test Automation: State of the Art

This chapter surveys the state of the art in code coverage from the pers...
research
07/28/2020

Automated Unit Test Generation for Python

Automated unit test generation is an established research field, and mat...
research
05/09/2022

Test Generation for SystemC designs by interlaced Greybox Fuzzing and Concolic Execution

Recent success in high-level synthesis ( HLS ) has enabled designing com...
research
09/10/2019

Suggestions on Test Suite Improvements with Automatic Infection and Propagation Analysis

An extreme transformation removes the body of a method that is reached b...

Please sign up or login with your details

Forgot password? Click here to reset