A Complete Overview of Positive Testing:
This tutorial will give you a brief introduction to one of the most prominent testing types ‘Positive testing’.
Software Testing is the process of verifying and validating software and confirming that it is working as expected. A software tester should have the intent to find defects and make sure that the application is working as expected. In order to achieve this different testing types and test techniques are used.
The exact meaning, advantages, and types of performing Positive Testing are explained in simple terms along with easy examples in this tutorial.
Testing types can be classified as:
#1) Positive testing
#2) Negative Testing
Both these test types are essential for confirming that the software is working as expected.
What You Will Learn:
What is Positive Testing?
Positive Testing is a testing type that verifies that the application under test is working for a positive set of inputs.
In other words, positive testing is testing that is performed within the boundaries, and this testing checks that the product /application is behaving as per the specification document with a valid set of test data.
Example 1: A web application has a form to fill in.
For Example, consider a sign-in page, the User should enter username, and password and hit Submit. When the user enters the correct username and password and hits the Submit button, the user should be navigated to the next page.
Positive Testing Scenario:
Enter the correct Username and Password (For Example, Username, and Password), click on the submit button and verify that the user is navigated to the next page as expected.
Example 2: Consider a Textbox that can accept only numbers.
Positive Testing Scenario:
Enter numbers and check that the input is accepted by the application under test.
When to Perform Positive Testing?
Positive testing is performed when the application is ready for testing. A tester can execute all the other scenarios planned for that functionality like Negative testing, Database testing, etc. only after positive testing is passed.
Performing positive testing whenever the build is ready is called Smoke testing, build verification testing, sanity testing, and quality gate, etc., whatever the name, but performing positive testing is the first step of test execution.
How to Perform Positive Testing?
Test techniques used in positive testing are as follows:
- Boundary Value Analysis
- Equivalence Partitioning
These techniques will be applicable whenever a tester needs to test the numeric fields. While performing this positive testing, a tester should consider the Input data, Actions performed, and Output result.
In positive testing, each time a tester should verify if the test input is within the boundaries of test data.
#1) Boundary Value Analysis:
Boundary value analysis is one of the test techniques that is used to test the numeric fields. In order to use this technique, a tester needs to create test data that falls within the boundaries or a data range.
Example: A field/system will accept numbers from 1 to 100. The rest of the numbers are invalid.
Using this technique, boundary values are 0, 1, 2, and 99,100 (Values within the boundaries from 1 to 100).
#2) Equivalence Partitioning:
Equivalence Partitioning is another testing technique, in which a tester will divide the test input into equal partitions and use the values from each partition as test data.
A tester should make sure the test data contains values from all partitions.
Example: A field/system will accept numbers from 1 to 100. Rest all numbers are invalid.
In the Equivalence Partitioning test technique the input data is divided into 4 partitions as mentioned below,
First partition: 1 to 25
Second partition: 26 to 50
Third partition: 51 to 75
Fourth partition: 76 to 100
While using the equivalence partitioning technique with Positive testing, all the test data are selected in the range of 1 to 100.
Advantages/Uses of Positive Testing
Positive Testing is the first step of testing to ease the testing to the next level.
This testing is used to test the positive path of an application. If this testing fails, it means that the basic functionality of the application is not working and corresponding action should be taken immediately to continue further testing.
Positive testing saves the efforts of a tester by identifying the wrong build in the initial stages.
Positive testing will have less coverage and it confirms that the application is working for the specified input range as expected and it does not guarantee the quality of an application as a tester cannot verify the behavior of an application in unexpected situations like ‘when a user enters wrong data’.
A web application has a form to fill out.
For Example, consider a sign-in page, where a user should enter a username, and password and hit Submit. When the user enters the correct username and password and hits the Submit button, the user should be navigated to the next page.
Possible test scenarios for the above functionality are:
Test Scenario 1: Enter the correct username and password and click on the submit button.
Expected Result: The user should be navigated to the next page.
Test Scenario 2: Enter the wrong Username and password and click on the submit button.
Expected Result: User should receive a proper error message as ‘Username and password doesn’t match.
Test Scenario 3: Don’t enter anything and click on submit button.
Expected Result: The user should receive a proper error message as ‘Enter a valid username’.
Test Scenario 4: Enter Username as 123 and click on submit.
Expected Result: The user should receive an error message as ‘Username cannot be numeric’.
And so on…
Among all these “Test Scenario 1” comes under positive testing and the rest of the scenarios come under negative testing.
Software testing helps to deliver bug-free software. Positive testing is a test type that confirms that the application is working as expected with all possible inputs.
All other testing types are necessary to make sure that the application is bug-free and stable.
Hope you are completely clear about the concept of Positive Testing!!
Have you performed Positive Testing? Do you have any other interesting examples to share with us? Feel free to share your thoughts in the comments section below!!
2 thoughts on “Positive Testing: Meaning and Merits Explained with Real Test Scenarios”
Very useful posts, a great information shared. Job opportunities for software development and software testing are increasing nowadays. So a minimum knowledge about software testing is not a wastage of time.
Hai this is venkatarao nice explanation meaning positive testing
for suppose i will give correct username wrong password
and correct password wrong username give some examples on that