A<5)and(B=5) X=X/A (A=2)or(X>2) X=X+1完成以下要求: (1)用语句覆盖写测试用例(2)用判定覆盖设计测试用例(3)用条件覆盖设计测试用例(4)用判定/条件覆盖设计测试用 例 (5)用多重条件覆盖设计测试用例(6)用路径覆盖设计测试用例
时间: 2023-10-11 21:08:14 浏览: 48
逻辑覆盖的测试用例设计
5星 · 资源好评率100%
1. 测试用例(语句覆盖):
A = 4, B = 5, X = 6
2. 测试用例(判定覆盖):
A = 2, B = 5, X = 1
3. 测试用例(条件覆盖):
(A < 5) and (B = 5), X = 3
4. 测试用例(判定/条件覆盖):
(A = 2) and (X ≤ 2), A = 2, B = 5, X = 1
5. 测试用例(多重条件覆盖):
(A = 2) and (X ≤ 2), A = 3, B = 6, X = 4
6. 测试用例(路径覆盖):
路径1: A < 5, B = 5, X = X/A, A = 2, X > 2, X = X
测试用例:A = 2, B = 5, X = 6
路径2: A < 5, B = 5, X = X/A, A = 2, X ≤ 2, (A = 2) or (X > 2), X = X
测试用例:A = 2, B = 5, X = 1
路径3: A < 5, B ≠ 5, X = X/A, X = X
测试用例:A = 3, B = 6, X = 8
阅读全文