Extracting Inline Tests from Unit Tests
Extracting Inline Tests from Unit Tests
复制标题
从单元测试中提取内联测试
DOI:
10.1145/3597926.3598149
复制
发表时间:
2023
期刊:
影响因子:
--
通讯作者:
Legunsen, Owolabi
中科院分区:
文献类型:
--
作者:
Liu, Yu;Nie, Pengyu;Guo, Anna;Gligoric, Milos;Legunsen, Owolabi
We recently proposed inline tests for validating individual program statements; they allow developers to provide test inputs, expected outputs, and test oracles immediately after a target statement. But, existing code can have many target statements. So, automatic generation of inline tests is an important next step towards increasing their adoption. We propose ExLi, the first technique for automatically generating inline tests. ExLi extracts inline tests from unit tests; it first records all variable values at a target statement while executing unit tests. Then, ExLi uses those values as test inputs and test oracles in an initial set of generated inline tests. Target statements that are executed many times could have redundant initial inline tests. So, ExLi uses a novel coverage-then-mutants based reduction process to remove redundant inline tests. We implement ExLi for Java and use it to generate inline tests for 718 target statements in 31 open-source programs. ExLi reduces 17,273 initially generated inline tests to 905 inline tests. The final set of generated inline tests kills up to 25.1% more mutants on target statements than developer written and automatically generated unit tests. That is, ExLi generates inline tests that can improve the fault-detection capability of the test suites from which they are extracted.
登录
查看更多内容
DOI:
--
发表时间:
2018
期刊:
International Conference on Software Engineering
影响因子:
--
作者:
Jun;Reyhaneh Jabbarvand;Joshua Garcia;S. Malek
通讯作者:
S. Malek
DOI:
10.1145/1146238.1146258
发表时间:
2006
期刊:
2007 IEEE Congress on Evolutionary Computation
影响因子:
--
作者:
Marat Boshernitsan;Roong;A. Savoia
通讯作者:
A. Savoia
DOI:
--
发表时间:
2019
期刊:
International Conference on Software Quality. Process Automation in Software Development
影响因子:
--
作者:
Raphael Noemmer;Roman Haas
通讯作者:
Roman Haas
影响因子:
--
作者:
Nie, Pengyu;Parovic, Marinela;Zang, Zhiqiang;Khurshid, Sarfraz;Milicevic, Aleksandar;Gligoric, Milos
通讯作者:
Gligoric, Milos
DOI:
10.1145/3551349.3556952
发表时间:
2022-09
期刊:
Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering
影响因子:
--
作者:
Yu Liu;Pengyu Nie;Owolabi Legunsen;Miloš Gligorić
通讯作者:
Yu Liu;Pengyu Nie;Owolabi Legunsen;Miloš Gligorić