To Call, or Not to Call: Contrasting Direct and Indirect Branch Coverage in Test Generation

To Call, or Not to Call: Contrasting Direct and Indirect Branch Coverage in Test Generation
复制标题

DOI:
10.1145/3194718.3194719
复制
发表时间:
2018-05
期刊:
2018 IEEE/ACM 11th International Workshop on Search-Based Software Testing (SBST)
影响因子:
--
通讯作者:
Gregory Gay
Gregory Gay
中科院分区:
其他
文献类型:
--
作者:
Gregory Gay

文献摘要

相似文献

尽管充分性标准提供了测试的终点,但它们并未要求涵盖目标。可以通过直接调用方法或方法之间的间接调用来实现分支覆盖范围。自动产生偏向间接覆盖范围提供的快速增长。因此,即使有相同的最终目标,人类和自动化也会产生截然不同的测试。直接覆盖可能会产生更易于理解的测试,并检测传统方法错过的故障。但是,生成框架的增加负担可能会导致较低的覆盖范围和通过方法相互作用出现的故障。为了比较这两种方法,我们已经为两者都生成了测试套件,从而判断出对实际缺陷的功效。我们发现需要直接覆盖范围导致覆盖范围较低和故障检测的可能性。但是,这两种形式的分支覆盖范围盖章,并检测另一个没有的故障。通过隔离方法,直接分支覆盖范围在输入的选择中受到限制。但是,传统的分支覆盖范围能够利用方法交互来发现故障。最终,两者在更广泛的测试策略的背景下都适用。
While adequacy criteria offer an end-point for testing, they do not mandate how targets are covered. Branch Coverage may be attained through direct calls to methods, or through indirect calls between methods. Automated generation is biased towards the rapid gains offered by indirect coverage. Therefore, even with the same end-goal, humans and automation produce very different tests. Direct coverage may yield tests that are more understandable, and that detect faults missed by traditional approaches. However, the added burden for the generation framework may result in lower coverage and faults that emerge through method interactions may be missed. To compare the two approaches, we have generated test suites for both, judging efficacy against real faults. We have found that requir- ing direct coverage results in lower achieved coverage and likelihood of fault detection. However, both forms of Branch Coverage cover code and detect faults that the other does not. By isolating methods, Direct Branch Coverage is less constrained in the choice of input. However, traditional Branch Coverage is able to leverage method interactions to discover faults. Ultimately, both are situationally applicable within the context of a broader testing strategy.