Need both positive and negative test cases for a given below scenario

3.6k views Asked by At

One of my friend got this below question in her interview.

Test Scenario:

A man moving from top of the building to bottom.

I somewhat able to write two positive test cases.

Positive Test case:

  1. Using Lift

  2. Using steps

But I am not able to write any negative test cases. Can you please help me?

3

There are 3 answers

0
user2306302 On BEST ANSWER

According to me cases somewhat would be like:

  1. Man is using stairs made of concrete to go down (positive)
  2. Man is using Stairs made of wood or rope (positive)
  3. Man is going down and steps are incomplete (negative)
  4. Man is going down via rope and stairs and half way its broken (negative)
  5. Man is using rope rope and wood stairs and Rope is not able to hold the weight of man. (Negative)
  6. Just a floor above ground no stairs are present (Negative)
  7. Man is falling from building (Negative)
0
user261881 On
  1. Man is moving down using staircase and it is broken (Negative) so he is unable to move any further.
  2. Man is stuck in Lift due to Power Failure (Negative)
2
CuongHuyTo On

Positive tests cases are cases that go along with the scenario. Negative test cases are any case that deviate from that scenario.

So some examples are:

  • Positive
    • Man jumps from building's top to the ground
    • Man flies from the building's top to the Moon and flies back to the bottom
    • Or any way that guarantees that the man starts from the building's top to the bottom
  • Negative
    • Man jumps from building's top to the ground but the gravity suddenly becomes negative and he cannot touch the ground
    • Same like above, but the wind upward is too strong
    • Same like above, but something prohibits him to go further when he is X% (0 <= X <= 100) done with his journey
    • Any deviation from any positive test case is a negative test case.

I use the notion X to mean that it is one of the examples where the number of test cases are infinite.

My experience so far explaining testing to people is that people in the IT industry don't understand enough about testing yet. In this example I try to explain how abstract testing is, but not sure if it is well perceived and understood.