2

I am learning ISTQB and encountering a question about Statement and Decision coverage in a sample exam of ASTQB org.

Evaluate the following control flow diagram and determine the statement coverage and decision coverage resulting from the execution of the following test cases:
enter image description here

  • A-B-D-E-F
  • A-B-C

There are 4 answer choice:

a. 33% statement, 100% decision

b. 50% statement, 50% decision

c. 100% statement, 75% decision

d. 100% statement, 100% decision

As the answer sheet, the correct one is: C. I understand why 100% statement , but 75% decision. We have 4 SCs:

  1. A-B-C (test case 1)
  2. A-B-D-E-F (test case 2)
  3. A-B-D-A-B-C (test case 3)
  4. A-B-D-A-B-D-E-F (test case 4)

So the coverage percentage is = the number of run test cases / the total of test cases = 2/4 = 50%. But it is not the same as the answer - 75%.

Am I understanding incorrectly? could you please help me point out what wrong it is and share more ideas on it.

Thank you so much. Learn.

2

You have 4 possible decisions/branches:

  1. B-C
  2. B-D
  3. D-E
  4. D-A

The 2 test cases A-B-D-E-F and A-B-C only cover 3 (1. – 3.) out of 4, which is why it's 75% decision/branch coverage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.