Positive Testing: Meaning and Merits Explained with Real Test Scenarios

A Complete Overview of Positive Testing:

This tutorial will give you a brief introduction of one of the most prominent testing types ‘Positive testing’.

Software Testing is the process of verifying and validating a 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 the types of performing Positive Testing are explained in simple terms along with easy examples in this tutorial.

Positive Testing

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 is Positive Testing?

Positive Testing is a testing type which verifies that the application under test is working for a positive set of inputs.

In other words, positive testing is a 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, 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.

Login Screen

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.

Positive Scenario Login Screen

Example 2: Consider a Textbox which can accept only numbers.

Text Box

Positive Testing Scenario:

Enter numbers and check that the input is accepted by the application under test.

Text Box

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 in 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 which falls within the boundaries or a data range.

Example: A field/system will accept numbers from 1 to 100. 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).

Boundary value Analysis

#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 if 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 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.

Equivalent Partitioning

Advantages/Uses of Positive Testing

Positive Testing is the first step of testing to ease the testing to the next levels.

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’.

Example:

A web application has a form to fill.

For Example, consider a sign in page, where a user should enter username, password and hit Submit. When the user enters correct username and password and hits the Submit button, the user should be navigated to the next page.

Login Screen

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: User should be navigated to the next page.

Test Scenario 2: Enter 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: 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: 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 all scenarios come under negative testing.

Conclusion

Software testing helps to deliver bug-free software. Positive testing is a test type which 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!!

1 Comment on “Positive Testing: Meaning and Merits Explained with Real Test Scenarios

  1. 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.

Leave a Comment