模型转换测试中的部分测试预言机
1. 模式生成步骤
在模型转换测试中,为了生成过滤比较结果的模式,需要进行以下步骤:
- 第一步 :定义观察到差异的元素。
- 第二步 :定义不可预测部分的元素。
- 第三步 :将前两步的模式组合成一个新模式,用于查找不可预测部分中观察到差异的元素。
以下是相关代码示例:
// A Final State F
pattern
finalState(F) = {
FinalState(F);
}
// A transition targeting a final State
pattern
finalTransition(T) = {
Transition(T);
FinalState(F);
Transition.target(T, F);
}
/*A is a Difference which is not about a FinalSate or a Transition targeting one FinalState
If the result is empty then the test pass for the common part*/
pattern
verdictPassIfAEmpty(A) = {
find
isDifference(A);
neg
f
超级会员免费看
订阅专栏 解锁全文
67

被折叠的 条评论
为什么被折叠?



