一句话:提出开源工具 tsDetect,用规则自动检测 Java 测试代码中的测试坏味道,平均精确率 96%、召回率 97%。
测试代码与生产代码一样,会受到不良设计与编程实践的影响,从而产生测试坏味道;这些坏味道会降低测试套件的质量、可维护性和可扩展性,并削弱其发现生产代码中潜在缺陷与质量问题的能力。本文介绍 tsDetect,一个面向 Java 软件系统的开源自动化测试坏味道检测工具,它通过一组检测规则在测试代码中定位已存在的测试坏味道。作者在包含 19 种测试坏味道实例的 65 个单元测试文件基准上评估其有效性。结果表明,tsDetect 具有较高检测准确率,平均精确率为 96%,平均召回率为 97%;工具和演示视频已公开。
The test code, just like production source code, is subject to bad design and programming practices, also known as smells. The presence of test smells in a software project may affect the quality, maintainability, and extendability of test suites making them less effective in finding potential faults and quality issues in the project's production code. In this paper, we introduce tsDetect, an automated test smell detection tool for Java software systems that uses a set of detection rules to locate existing test smells in test code. We evaluate the effectiveness of tsDetect on a benchmark of 65 unit test files containing instances of 19 test smell types. Results show that tsDetect achieves a high detection accuracy with an average precision score of 96% and an average recall score of 97%. tsDetect is publicly available, with a demo video, at: https://testsmells.github.io/
DOI 原文 ·
@inproceedings{paperbot5835,
title = {tsDetect: an open source test smells detection tool},
author = {Anthony Peruma and Khalid Almalki and Christian D. Newman and Mohamed Wiem Mkaouer and Ali Ouni and Fabio Palomba},
booktitle = {FSE},
year = {2020},
doi = {10.1145/3368089.3417921}
}