Positive and Negative Testing - Explanation with a simple example

| | 1 min read

In positive testing our intention is to prove that an application will work on giving valid input data. i.e. testing a system by giving its corresponding valid inputs.

For example:
Consider Drupal webpage containing a textbox whose specified requirement in the SRS document is to accept only numbers. In that case when we perform positive testing, we will give only numbers as input data in the textbox and analyse whether the application is working properly or not. Here, our expectation is that the text box should accept the given input values.

In negative testing our intention is to prove that an application will not work on giving invalid inputs.

In the same above example, while performing negative testing, we will give alphabets and special characters as input data in the textbox. Then we will check whether the application behaves as expected with the invalid input data. Here, our expectation is that the text box will not accept invalid values and will display an error message for the wrong entry.