Supported by the grants of the Research Grants Council of Hong Kong under Grant Nos.111107, 717308 (香港研究资助局); the Australian Research Council under Grant No.DP0984760 (澳大利亚研究理事会)
Experimental Study to Compare the Use of Metamorphic Testing and Assertion Checking
A test oracle in software testing is a mechanism for checking whether the program under test behaves correctly for any execution. In some practical situations, oracles can be unavailable or too xpensive to apply. Metamorphic testing (MT) was proposed to alleviate this problem so that software can be delivered under the time-to-market pressure. However, the effectiveness of MT has not been studied adequately. This paper conducts a controlled experiment to investigate the cost effectiveness of using MT. The fault detection capability and time cost of MT are compared with the standard assertion checking method. The results show that MT has potentials to detect more faults than the assertion checking method. The experimental results also show a trade-off between the two testing methods: MT can be less efficient but more effective, and can be defined at a coarser level of granularity than the assertion checking method.