Question 28 of the ASTQB Foundation 2018 Sample Exam 1 reads:

You have been given the following requirement: A user must log in to the system with a valid username and password. If they fail to enter the correct combination three times, they will receive an error and will have to wait 10 minutes before trying again. The test terminates when the user successfully logs in. How many test cases are needed to provide 100% state transition coverage?

a. 1

b. 2

c. 4

d. 5

According to the answer table, the correct answer is B:

enter image description here

But I'm struggling to understand why this answer is correct as it does not cover the transition from Attempt 3 - Success: enter image description here

I'm wondering if someone could clarify for me why my thinking is wrong and why the answer of 2 is correct.

1 Answer 1


The key is in the phrase "state transition coverage" - the question is asking for the smallest number of tests that can cover each transition between states at least once.

Essentially the states you are transitioning between are:

  • Login page (not logged in)
  • Home page (logged in)
  • Wait (too many invalid login attempts)

Since you will always start from the Login page, the Wait state is temporary, and you are testing invalid logins, your scenarios can only be:

  • Start at the login page, make no more than 2 invalid attempts, then make a valid login attempt and end at the home page.
  • Start at the login page, make 3 invalid attempts, wait, then make a valid login attempt and end at the home page.

Obviously you can have many more test cases, but this is the minimum to cover all the state transitions at least once.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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