Thursday, October 17, 2013

Positive and Negative Testing



The purpose of software testing is to verify that our software/application is working according to the expectations which are defined in the requirement document and gaining confidence over application. The overall objective is not to proof of correctness of this software/application. We write the test cases to perform the testing so that overall functionality and all the steps are covered these test cases. Test cases follow two approaches to verify all the functionality.


The purpose of software testing is to verify that our software/application is working according to the expectations which are defined in the requirement document and gaining confidence over application. The overall objective is not to proof of correctness of this software/application. We write the test cases to perform the testing so that overall functionality and all the steps are covered these test cases. Test cases follow two approaches to verify all the functionality.

Positive Testing:  The main purpose of positive testing to verify the functionality is working properly as we expected according to the requirement. 

Example- Now takes an example to write positive test cases on an Integer field which accept exactly 6 digit numbers.
              Integer Value field -  123456

Negative Testing:   The main purpose of negative testing to verify the response of application/system when we pass non recommended values. Basically we want to break down the application. You know that these input values are not supported by application but you need to test. So that sometimes it known as ‘Test to fail’.

Example- Now takes an example to write negative test cases on an Integer field which accept exactly 6 digit numbers.
                 Integer Value field –   qwe123           (Alphanumeric Value)
                 Integer Value field –  1234567           (Check an integer value more than 6 digit)
                 Integer Value field – 12345                (Check value less than six digit)

Both testing types have their own importance, if positive testing told about how smooth our application/Software on other end negative testing told all lacking, bugs/issues on which we are not supposed as per requirement document.  As you can see, negative testing improves the testing coverage of your application. Using the negative and positive testing approaches together allows you to test your applications with any possible input data (both valid and invalid) and can help you make your application more stable and reliable.


No comments:

Post a Comment