mọi người có ai biết về statement coverage với branch không chỉ cho em với. xác định và phân tích theo ví dụ này
1. Given the following code, which is true about the minimum number of test cases required for full statement and branch coverage:
Code: Select all
Read P
Read Q
IF P+Q > 100 THEN
Print “Large”
ENDIF
If P > 50 THEN
Print “P Large”
ENDIF
b) 1 test for statement coverage, 2 for branch coverage
c) 1 test for statement coverage, 1 for branch coverage
d) 2 tests for statement coverage, 3 for branch coverage
e) 2 tests for statement coverage, 2 for branch coverage
2. Given the following code, which is true:
a) 1 test for statement coverage, 3 for branch coverageIF A > B THEN
C = A – B
ELSE
C = A + B
ENDIF
Read D
IF C = D Then
Print “Error”
ENDIF
b) 2 tests for statement coverage, 2 for branch coverage
c) 2 tests for statement coverage. 3 for branch coverage
d) 3 tests for statement coverage, 3 for branch coverage
e) 3 tests for statement coverage, 2 for branch coverage
Ai biết giúp em với ạ
Thanks