Positive and Negative Testing In Software Testing

Software testing is process of Verification and Validation to check whether software application under test is working as expected. To test the application we need to give some input and check if getting result as per mentioned in the requirements or not. This testing activity is carried out to find the defects in the code & improve the quality of software application. Testing of application can be carried out in two different ways, Positive testing and Negative testing.

Positive Testing:

Positive Testing is testing process where the system validated against the valid input data. In this testing tester always check for only valid set of values and check if a application behaves as expected with its expected inputs. The main intention of this testing is to check whether software application not showing error when not supposed to & showing error when supposed to. Such testing is to be carried out keeping positive point of view & only execute the positive scenario. Positive Testing always tries to prove that a given product and project always meets the requirements and specifications. Under Positive testing is test the normal day to day life scenarios and check the expected behavior of application.

Example of Positive testing:

Consider a scenario where you want to test an application which contains a simple textbox to enter age and requirements say that it should take only integers values. So here provide only positive integer values to check whether it is working as expected or not is the Positive Testing. Most of the applications developers are implement Positive scenarios where testers get less defects count around positive testing.

Positive Testing In Software Testing

Negative Testing:

Negative Testing is testing process where the system validated against the invalid input data. A negative test checks if a application behaves as expected with its negative inputs. The main intention of this testing is to check whether software application not showing error when supposed to & showing error when not supposed to. Such testing is to be carried out keeping negative point of view & only execute the test cases for only invalid set of input data.

Negative testing is a testing process to identify the inputs where system is not designed or un-handled inputs by providing different invalid. The main reason behind Negative testing is to check the stability of the software application against the influences of different variety of incorrect validation data set.

Example of Negative Testing

Consider a same above age textbox example which should accept only integers values. So here provide the characters like “abcd” in the age textbox & check the behavior of application, either it should show a validation error message for all invalid inputs (for all other than integer values) or system should not allow to enter a non integer values.

Negative Testing In Software Testing

The Negative testing helps to improve the testing coverage of your software application under test. Both positive and negative testing approaches are equally important for making your application more reliable and stable.

 Let’s take a other example of Positive and negative testing scenarios:

If the requirement is saying that password text field should accepts 6 – 20 characters and only alphanumeric characters.

Positive Test Scenarios:

  • Password textbox should accept 6 characters
  • Password textbox should upto 20 characters
  • Password textbox should accepts any value in between 6-20 chars length.
  • Password textbox should accepts all numeric & alphabets values.

Negative Test scenarios:

  • Password textbox should not accept less than 6 characters
  • Password textbox should not exceeds more than 20 characters
  • Password textbox should not accept special characters

Conclusion:

Keep in mind that both positive and negative testing is equally important for effective testing which help to improve quality of software. Negative testing help to find more defects & improve the quality of the software application under test but it should be done once the positive testing is completed. End users can enter any input values, such real life scenarios can be tested before moving software live. Main aim means purpose of Positive and Negative Testing is to prove that the application works as per the requirements and specifications.

If you enjoy reading this article please make sure to share it with your friends. Please leave your questions/tips/suggestions in the comment section below and I’ll try to answer as many as I can.

15 thoughts on “Positive and Negative Testing In Software Testing”

  1. hi,
    i am MBA Graduate in Marketing Specialization. I am Interested into Software Field.
    please suggest me, Is Testing Carrer is good for me now and in future.
    i am not aware of coding part. so i am highlighting Specific.

    Thanks in advance.

    Reply
  2. @Priya: Yes it is depends on your intrest, you can come in the software field, but prior coming you should have basic understanding of software coding or testing field.
    First decide on which field you want to grow as your carrier. Based on decision join software courses.

    Thanks,
    Shailendra

    Reply
  3. @priya, even im an MBA , but i chose software testing field as its challenging and enables one to learn new things and become more creative person. go for it!

    Reply
  4. I have one query, Is it required to cover negative testing every time or we can skip negative testing and only positive testing suffice?

    Reply
  5. The above explanation easy to understand but, i am new to software testing, Can you help me for testing procedure from the beginning……….And what are the testing procedure to test the application.Please give an idea….

    Reply

Leave a Comment

Share This Post