QuestionQ2

VerifiedTesting in Agile

When flying on an economy ticket, you might be upgraded to business class, particularly when you hold a gold card in the airline’s frequent-flier program. If you do not hold a gold card, you might be bumped from the flight when it is full and you check in late. This is illustrated in the following figure. Each box (statement) is numbered.

Three tests have been run:

  • Test 1: A gold-card holder who is upgraded to business class
  • Test 2: A non-gold-card holder who remains in economy
  • Test 3: A person who is bumped from the flight

What is the statement coverage for these three tests?

Question Image

Explanation

The tests collectively execute eight distinct numbered statements: 1, 2, 4, 5, 6, 7, 8, and 10. Of the ten numbered statements, this yields statement coverage of 8/10, or 80%.

Community Discussion

No comments yet. Be the first to start the discussion!