arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1202.6121cs.SE
收藏

ISO-C中代码覆盖率计算的精确间隙计算

Exact Gap Computation for Code Coverage Metrics in ISO-C

Dirk Richter, Christian Berg

摘要:

测试生成和测试数据选择是基于模型的测试的难点。一个程序的测试可以合并到一个测试套件中。大量的研究被用来量化测试集的质量和改进测试集。代码覆盖度量评估测试套件的质量。如果代码覆盖率值很高或为100%,则此质量很好。不幸的是,由于死代码的存在,实现100%的代码覆盖率是不可能的。在可行的和理论上最大可能的代码覆盖率值之间存在差距。我们的研究回顾表明,目前的研究都没有涉及精确的间隙计算。本文提出了一个框架,以计算这样的差距,正是在一个ISO-C兼容的语义和类似的语言。我们描述了一个有效的近似在所有其他情况下的差距。因此,测试人员可以决定更多的测试是否能够或有必要获得更好的覆盖率。

英文摘要:

Test generation and test data selection are difficult tasks for model based testing. Tests for a program can be meld to a test suite. A lot of research is done to quantify the quality and improve a test suite. Code coverage metrics estimate the quality of a test suite. This quality is fine, if the code coverage value is high or 100%. Unfortunately it might be impossible to achieve 100% code coverage because of dead code for example. There is a gap between the feasible and theoretical maximal possible code coverage value. Our review of the research indicates, none of current research is concerned with exact gap computation. This paper presents a framework to compute such gaps exactly in an ISO-C compatible semantic and similar languages. We describe an efficient approximation of the gap in all the other cases. Thus, a tester can decide if more tests might be able or necessary to achieve better coverage.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑