Generating Unit Tests for Documentation

05/18/2020
by   Mathieu Nassif, et al.
0

Software projects capture information in various kinds of artifacts, including source code, tests, and documentation. Such artifacts routinely encode information that is redundant, i.e., when a specification encoded in the source code is also separately tested and documented. Without supporting technology, such redundancy easily leads to inconsistencies and a degradation of documentation quality. We designed a tool-supported technique, called DScribe, that leverages redundancy between tests and documentation to generate consistent and checkable documentation and unit tests based on a single source of information. DScribe generates unit tests and documentation fragments based on a novel template and artifact generation technology. By pairing tests and documentation generation, DScribe provides a mechanism to automatically detect and replace outdated documentation. Our evaluation of the Apache Commons IO library revealed that of 835 specifications about exception handling, 85 them were not tested or correctly documented, and DScribe could be used to automatically generate 97

READ FULL TEXT
research
12/02/2020

Production Monitoring to Improve Test Suites

Software testing ensures that a software system behaves as intended. In ...
research
04/30/2023

Exploring the Effectiveness of Large Language Models in Generating Unit Tests

A code generation model generates code by taking a prompt from a code co...
research
10/06/2019

Automated Isolation for White-box Test Generation

Context. White-box test generation is a technique used for automatically...
research
10/26/2021

Automated Support for Unit Test Generation: A Tutorial Book Chapter

Unit testing is a stage of testing where the smallest segment of code th...
research
02/10/2022

Pynguin: Automated Unit Test Generation for Python

Automated unit test generation is a well-known methodology aiming to red...
research
02/26/2021

EvoSpex: An Evolutionary Algorithm for Learning Postconditions

Software reliability is a primary concern in the construction of softwar...
research
01/23/2020

Referencing Source Code Artifacts: a Separate Concern in Software Citation

Among the entities involved in software citation, software source code r...

Please sign up or login with your details

Forgot password? Click here to reset