2

How do I answer this tech interview whiteboard question on testing? What is the minimal number of tests to cover the functionality of Scenario #1?

Scenario #1:

The application depicted below is a multiple part form. To complete the form, a user must complete all 3 steps of the form and save it. Once a step is complete, it cannot be edited or changed. The user can save an uncompleted step. When they return to the application, they must return to the same uncompleted step with their data intact (i.e. they should be able to pick up where they left off).

Note: There are 2 interfaces to the application. There are a website and a mobile app. The mobile app is supported on the latest iOS version and Android versions. For iOS, the application is supported on the latest iPhone and iPad devices only. For Android, the application supports 1 device (Google Pixel). Diagram

2
  • 1
    What did you say during the interview? Did they have a response to that?
    – corsiKa
    Commented Oct 28, 2020 at 4:27
  • "What is the minimal number of tests to cover the functionality" is not an answerable question. You said "a user must complete all 3 steps" and then you said "user can X", "user can Y" - however, the type of question you should ask is "will the user do X?". This is a more profound question that cannot be encoded in a specific number of fact checks. Commented Oct 28, 2020 at 11:32

3 Answers 3

1

"What is the minimal number of tests to cover the functionality" is not an answerable question. You said "a user must complete all 3 steps" and then you said "user can X", "user can Y" - however, the type of question you should ask is "will the user do X?". This is a more profound question that cannot be encoded in a specific number of fact checks.

Additionally, you would need to be more precise in what type of coverage you are looking for, and thus the states your testing is interested in investigating.

E.g., if you add network conditions to your testing, your coverage changes completely in relation to not considering network conditions. Fake GPS enabling, low resources, etc, etc, etc, everything will affect your coverage.

enter image description here

Many other factors can be found in this answer.

When you have more precise goals, you can use state-based coverage techniques during your exploration of the product.

1

You can use state transition logic ,

here each form has two actions , one is save and another is goto next

And this form is available across two interface (web and Mobile)

So there can be the list 12 test cases

(Total forms or state * Total action) * Total interface =( 3 * 2 ) * 2 = 12

Here i consider transiting to next state involve testing of that state also

if you consider transiting to another state, the new form and save as three use cases then, each form as 3 actions , plus last "form complete" testing , so minimum tests will be

((Total forms or state * Total action) * Total interface ) + Final state = ((3 * 3) * 2) + 1 = 19

1

My answer would probably be a question:

What are the risks involved in the application? The minimum number of tests would greatly depend on these risks. I think most risks are not covered by minimal path coverage. Like Joao said, adding infrastructure to the test mix could explode the number of test cases. Which might be worth it if people could die based on what they put in the form.

Can I see the code? Functional flow descriptions on paper are rarely the path that the application code actually takes.

I would never ask such a question during an interview, and I would really wonder if this is shop I would want to work at.

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.