Positive Testing and Negative Testing With Examples
Positive Testing and Negative Testing With Examples
Examples
Positive Testing
Positive Testing is a type of testing which is performed on a software
application by providing the valid data sets as an input. It checks whether the
software application behaves as expected with positive inputs or not. Positive
testing is performed in order to check whether the software application does
exactly what it is expected to do.
There is a text box in an application which can accept only numbers. Entering
values up to 99999 will be acceptable by the system and any other values apart
from this should not be acceptable. To do positive testing, set the valid input
values from 0 to 99999 and check whether the system is accepting the values.
Negative Testing
• Input data
• An action which needs to be performed
• Output Result
Following techniques are used for Positive and negative validation of testing is:
This is one of the software testing technique in which the test cases are
designed to include values at the boundary. If the input data is used within the
boundary value limits, then it is said to be Positive Testing. If the input data is
picked outside the boundary value limits, then it is said to be Negative Testing.
A system can accept the numbers from 0 to 10 numeric values. All other
numbers are invalid values. Under this technique, boundary values -1,0,1 and
9,10,11 will be tested.
Equivalence Partitioning:
This is a software testing technique which divides the input data into many
partitions. Values from each partition must be tested at least once. Partitions
with valid values are used for Positive Testing. While partitions with invalid
values are used for negative testing.
Numeric values Zero to ten can be divided into two (or three) partitions. In our
case, we have two partitions -10 to -1 and 0 to 10. Sample values (5 and -5) can
be taken from each part to test the scenarios.