In this article, we will see what is positive testing with some example positive test scenarios.
The article contains the following sections:
What is Positive Testing with Examples?
From the software testers’ point of view, it is very important to verify that the software performs its basic functions as per the requirements. In Positive testing, the tester always checks for only valid sets of input values and verifies if the software under test or application behaves as it is designed to work. The word itself explains that positive testing is performed with a positive set of data.
The main goal of this testing is to check whether a software application is not showing an error when it is not supposed to and showing error when it is supposed to. Positive testing always tries to prove that a given product or project always meets the requirements and specifications.
Examples of Positive Testing (Positive Testing Scenarios):
Example #1. Testing of a phone number field.
Test cases for positive testing could be input numeric values in the phone number field, test the exact number of characters in the phone number field.
Example #2. Testing of age field.
Test case for positive testing could be to input age greater than zero, input numeric field in age field.
Example #3. Testing of the zip code field.
Zipcode format varies in different countries. Positive test cases in such scenarios could be input numeric value for the USA, India, and alphanumeric for Canada, UK.
When to perform Positive Testing?
Positive testing is performed when the build is ready from the developer team. This type of testing is performed as a build verification step. We can consider positive testing as a subset of Smoke Testing.
Techniques Used in Positive Testing
Techniques used for positive validation of testing are:
Boundary Value Analysis:
It is related to the valid partition in your input test data range. It involves testing both sides of each boundary. Valid partition is going to have 2 boundaries – lower and upper boundary. If input test data range is A-B, positive test cases should be designed for A, A+1, B-1, B
Example #1: For date field (1-31), valid partition lower boundary(input 1 in date field) and valid upper boundary(input 31 in date field) are considered for positive test cases.
Example #2: For username fields having specifications of 6-10 characters, valid partition lower boundary(6 characters) and valid partition upper boundary(10 characters) are considered for positive test cases.
Example #3: For floating-point values, let the system accept values from 0.2 to 0.8 with one decimal place. Valid partition lower boundary(input 0.2) and valid upper boundary(input 0.8) are considered for positive test cases.
Read more about Boundary Value Analysis Test Case Design Technique here
In this technique, input test data is divided into partitions. For positive testing, if you pick a value from a valid partition, the system should accept that value.
Example #1: For date field (1-31), input any value from valid partition i.e. 1-31, and test the behavior of the system.
Example #2: For username fields having specifications of 6-10 characters, input any value from valid partition i.e. 6-10, and test the behavior of the system.
Example #3: For Age fields between 18-80 years except for 60-65 yrs, input any value from valid partition i.e. 18-59 & 66-80, and test the behavior of the system.
Read more about Equivalence Test Case Design Technique here
What is the difference between Positive Testing & Negative Testing
Positive Testing Vs Negative Testing
|Positive Testing||Negative Testing|
|It is performed by passing valid test data||It is performed by passing invalid test data|
|It is performed to verify the known set of Test Conditions||It is performed to break the application with unknown set of Test Conditions|
|It covers only valid cases||It covers all possible cases including invalid cases|
|It takes less time||It takes more time|
|It verifies all the requirements are met||It verifies the work flows which are not mentioned in the requirements|
|It makes sure software is working as expected||It makes sure the software is defect free|