Published November 4, 2018 | Version 1.0

AssertConvert: Automatically Convert JUnit Assertions to English

  • 1. Rochester Institute of Technology
  • 2. University of South Carolina

Description

This is the AssertConvert tool, presented as a command-line-executable .jar file. There is a README with instructions.

It was developed as a supplement to the paper A Fine-Grained Approach for Automated Conversion of JUnit Assertions to English presented November 4th at the NL4SE workshop.

Abstract:

Converting source or unit test code to English has been shown to improve the maintainability, understandability, and analysis of software and tests. Code summarizers identify important statements in the source/tests and convert them to easily understood English sentences using static analysis and NLP techniques. However, current test summarization approaches handle only a subset of the variation and customization allowed in the JUnit assert API (a critical component of test cases) which may affect the accuracy of conversions. In this paper, we present our work towards improving JUnit test summarization with a detailed process for converting a total of 45 unique JUnit assertions to English, including 37 previously-unhandled variations of the assertThat method. This process has also been implemented and released as the AssertConvert tool. Initial evaluations have shown that this tool generates English conversions that accurately represent a wide variety of assertion statements which could be used for code summarization or other NLP analyses.

Notes

If anyone should notice a problem with this tool, please email dng2551@rit.edu

Files

AssertConvertTool.zip

Files (749.6 MB)

Name Size
md5:56605f89c91790e2b8919911ca6177f4
749.6 MB Preview Download

Additional details

Related works

Is supplement to
10.1145/3283812.3283819 (DOI)
arXiv:1811.05005 (arXiv)