Cited by 22Software Testing and Debugging TechniquesSoftware Engineering ResearchSoftware Engineering Techniques and Practices

Generating Unit Tests for Documentation

Open access
Nassif, Mathieu, Hernandez, Alexa, Sridharan, Ashvitha, Robillard, Martin P.·2022·IEEE Transactions on Software Engineering

Abstract

Software projects capture redundant information in various kinds of artifacts, as specifications from the source code are also tested and documented. Such redundancy provides an opportunity to reduce development effort by supporting the joint generation of different types of artifacts. We introduce a tool-supported technique, called DScribe, that allows developers to combine unit test and documentation templates, and to invoke these templates to generate documentation and unit tests. DScribe supports the detection and replacement of outdated documentation, and the use of templates can encourage extensive test suites with a consistent style. Our evaluation of 835 specifications revealed that 85 percent were not tested or correctly documented, and DScribe could be used to automatically generate 97 percent of the tests and documentation. An additional study revealed that tests generated by DScribe are more focused and readable than those written by human testers or generated by state-of-the-art automated techniques.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1109/tse.2021.3087087

Cites

2 of 2 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Nassif, M., Hernandez, A., Sridharan, A., & Robillard, M. P.
Affiliations
McGill University (CA)
Venue
IEEE Transactions on Software Engineering
Published
2022-09-01
Volume
48
Issue
9
Pages
3268-3279
ISSN
  • 0098-5589 (ISSN-L)
  • 1939-3520
  • 2326-3881
OpenAlex
W3025537827
Cited by
22
References
2
Citations by year
2026: 2 · 2025: 5 · 2024: 5 · 2023: 5 · 2022: 4 · 2021: 1
FWCI
6.24
Type
journal article
Language
en
Open access
Locations
  • IEEE Transactions on Software Engineering (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Funders
Natural Sciences and Engineering Research Council of Canada
Topics
  • Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Techniques and Practices
Keywords
unit test generation, software documentation, template-based generation, specification testing, test suite completeness, test readability

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review