Explain positive and negative testing with an example.
What the interviewer wants to hear
- Positive testing uses valid inputs and expected flows
- Negative testing uses invalid inputs and unexpected actions
- System should handle negative cases gracefully with clear errors
- Concrete example such as a mobile number field
Model answer
Positive testing checks that the system works with valid input and normal user behaviour. Negative testing checks that it handles invalid input or unexpected actions without crashing and with a clear message. Take a mobile number field for India that should accept 10 digits starting with 6 to 9. A positive test is entering 9876543210 and seeing it accepted. Negative tests include entering 9 digits, 11 digits, letters, a number starting with 1, spaces, an empty value, or pasting +91 with the number, depending on the rules. For each, the expected result is a friendly error and no data saved. Negative testing is important because real users make mistakes and attackers send bad input on purpose. Many serious bugs, like a 500 error or a crash, are found through negative tests rather than the happy path.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy QA Engineer questions
- How would you test a login page?
- What is the Software Testing Life Cycle (STLC) and how does it fit with the SDLC?
- How do you decide which test cases go into a regression suite?
- What does a QA engineer do in an Agile Scrum team?
- Walk me through the life cycle of a defect, from the moment you find it until it is closed.
- What is the difference between a test scenario and a test case? Give an example of each.
- How would you test a file upload feature that accepts PDF documents up to 10 MB?
- Explain boundary value analysis and equivalence partitioning, and show how you would use them together on a field.
- How do you plan and run an exploratory testing session, and how do you report what you found?