DeepTC-Enhancer: Improving the Readability of Automatically Generated Tests
DeepTC-Enhancer: Improving the Readability of Automatically Generated Tests
复制标题
DeepTC-Enhancer:提高自动生成测试的可读性
DOI:
10.1145/3324884.3416622
复制
发表时间:
2020
期刊:
影响因子:
--
通讯作者:
Mehdi Mirakhorli
中科院分区:
文献类型:
--
作者:
Devjeet Roy;Ziyi Zhang;Maggie Ma;Venera Arnaoudova;Annibale Panichella;Sebastiano Panichella;Danielle Gonzalez;Mehdi Mirakhorli
Automated test case generation tools have been successfully proposed to reduce the amount of human and infrastructure resources required to write and run test cases. However, recent studies demonstrate that the readability of generated tests is very limited due to (i) uninformative identifiers and (ii) lack of proper documentation. Prior studies proposed techniques to improve test readability by either generating natural language summaries or meaningful methods names. While these approaches are shown to improve test readability, they are also affected by two limitations: (1) generated summaries are often perceived as too verbose and redundant by developers, and (2) readable tests require both proper method names but also meaningful identifiers (within-method readability). In this work, we combine template based methods and Deep Learning (DL) approaches to automatically generate test case scenarios (elicited from natural language patterns of test case statements) as well as to train DL models on path-based representations of source code to generate meaningful identifier names. Our approach, called DeepTC-Enhancer, recommends documentation and identifier names with the ultimate goal of enhancing readability of automatically generated test cases. An empirical evaluation with 36 external and internal developers shows that (1) DeepTC-Enhancer outperforms significantly the baseline approach for generating summaries and performs equally with the baseline approach for test case renaming, (2) the transformation proposed by DeepTC-Enhancer results in a significant increase in readability of automatically generated test cases, and (3) there is a significant difference in the feature preferences between external and internal developers.
登录
查看更多内容
DOI:
10.1109/icse-seip.2017.27
发表时间:
2017-05
期刊:
2017 IEEE/ACM 39th International Conference on Software Engineering: Software Engineering in Practice Track (ICSE-SEIP)
影响因子:
--
作者:
M. Almasi;H. Hemmati;G. Fraser;Andrea Arcuri;Janis Benefelds
通讯作者:
M. Almasi;H. Hemmati;G. Fraser;Andrea Arcuri;Janis Benefelds
DOI:
10.1109/icst.2013.11
发表时间:
2013-03
期刊:
2013 IEEE Sixth International Conference on Software Testing, Verification and Validation
影响因子:
--
作者:
S. Afshan;Phil McMinn;Mark Stevenson
通讯作者:
S. Afshan;Phil McMinn;Mark Stevenson
DOI:
10.1145/3092703.3092727
发表时间:
2017-07
期刊:
Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis
影响因子:
--
作者:
Ermira Daka;J. Rojas;G. Fraser
通讯作者:
Ermira Daka;J. Rojas;G. Fraser
影响因子:
3.5
作者:
Anand, Saswat;Burke, Edmund K.;Zhu, Hong
通讯作者:
Zhu, Hong