Test Analysis: Searching for Faults in Tests (N)

Test Analysis: Searching for Faults in Tests (N)
复制标题

测试分析:寻找测试中的故障(N)

DOI:
--
复制
发表时间:
2015
期刊:
International Conference on Automated Software Engineering
影响因子:
--
通讯作者:
Sebastian G. Elbaum
Sebastian G. Elbaum
中科院分区:
--
文献类型:
--
作者:
M. Waterloo;Suzette Person;Sebastian G. Elbaum

文献摘要

被引文献

相似文献

测试越来越多地被指定为程序。将测试表示为代码的优点在于,开发人员可以轻松地编写和运行代码,并且测试可以随着软件的发展而自动化和重用。但是,以代码形式表示的测试也可能包含错误。有些测试错误与应用程序代码中的测试错误类似,而其他测试错误则更为微妙,是由测试概念和过程的不正确实现引起的。这些错误可能导致测试在不应该失败的时候失败,或者允许程序错误未被检测到。在这项工作中,我们将探讨轻量级的静态分析是否可以具有成本效益,在查明与故障测试相关的模式。我们的探索包括测试模式的分类和解释,以及它们在12个开源项目中的应用,其中包括超过40K的测试。我们发现,通过简单有效的静态分析测试代码可以检测到的几种模式可以以较低的误报率检测到故障,而其他模式则需要更复杂和更广泛的代码分析才能有用。
Tests are increasingly specified as programs. Expressing tests as code is advantageous in that developers are comfortable writing and running code, and tests can be automated and reused as the software evolves. Tests expressed as code, however, can also contain faults. Some test faults are similar to those found in application code, while others are more subtle, caused by incorrect implementation of testing concepts and processes. These faults may cause a test to fail when it should not, or allow program faults to go undetected. In this work we explore whether lightweight static analyses can be cost-effective in pinpointing patterns associated with faults tests. Our exploration includes a categorization and explanation of test patterns, and their application to 12 open source projects that include over 40K tests. We found that several patterns, detectable through simple and efficient static analyses of just the test code, can detect faults with a low false positive rate, while other patterns would require a more sophisticated and extensive code analysis to be useful.