标题: 【原创】Metamorphic Testing 蜕变测试 简介 [打印本页] 作者: taziji 时间: 2007-11-7 19:49 标题: 【原创】Metamorphic Testing 蜕变测试 简介 下面是一个比较正式的关于蜕变测试(Metamorphic Testing)的定义:
Metamorphic testing is used in conjunction with other test case selection strategies Given a test case selection strategy S, such as path coverage, a set of test cases T ={t1,t2,t3...tn} , where is n>=1 generated. The program is then tested on T . If no failure is revealed after running all in T for i = 2, .. . , n,then T will be a set of successful test cases.
At this stage, metamorphic testing can be carried out to generate follow-up test cases according to metamorphic relations. A metamorphic relation (MR) is an expected relation among the inputs and outputs of multiple executions of the target program. For a successful test case and a chosen MR, we can construct follow-up test say ti' and run the program again. Let p denote the program under test. We check ti, p(ti),ti' and p(ti')against the MR. If MR cannot be satisfied, the program must have failed.