Auto-generated Spies Increase Test Maintainability

08/29/2018
by   Konstantin Läufer, et al.
0

We have inspected the test code for the scala.collection.Iterator trait for potential systematic maintainability enhancements. Test spies are stub objects for later verification of interactions with those objects in a testing scenario. According to our preliminary findings, using a mocking framework that supports the automatic generation of test spies, such as Mockito, can lead to a significant improvement of test code in terms of size (in some cases over 70 smaller), readability, and conveying intent by expressing expectations through a declarative domain-specific language. We argue that the resulting test code is not only more maintainable but also a better stylistic match for the Scala community than manually implemented, explicitly stateful test spies.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/21/2018

Accelerating Test Automation through a Domain Specific Language

Test automation involves the automatic execution of test scripts instead...
research
12/20/2022

Execution-Based Evaluation for Open-Domain Code Generation

To extend the scope of coding queries to more realistic settings, we pro...
research
02/14/2022

CodeGen-Test: An Automatic Code Generation Model Integrating Program Test Information

Automatic code generation is to generate the program code according to t...
research
07/12/2021

Automated Mobile App Test Script Intent Generation via Image and Code Understanding

Testing is the most direct and effective technique to ensure software qu...
research
02/14/2023

Developer-Intent Driven Code Comment Generation

Existing automatic code comment generators mainly focus on producing a g...

Please sign up or login with your details

Forgot password? Click here to reset