Upload
lyphuc
View
225
Download
1
Embed Size (px)
Citation preview
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 Testingalways 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.
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.
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.
Source: http://www.softwaretestingclass.com/positive-and-negative-testing-in-
software-testing/