Open In App

Positive Testing – Software Testing

Last Updated : 29 Jan, 2024
Like Article

SDLC stands for Software Development Life Cycle. It consists of a sequence of steps that have to be followed by an organization to develop and deploy its software. It consists of 7 phases-Planning, Analysis, Design, Development, Testing, Implementation, and Maintenance.

Software testing plays an important role. After the planning, requirement analysis, design, and code were developed, the testing phase gets started. This testing phase is handled by Quality Analyst or Software Test Engineer to test the software with various test cases to ensure that the developed product or software is working properly as per their requirement. During testing, the tester will find bugs or errors in the developed code and help the end-users to correct their mistakes while interacting with the software.

There are various types of testing techniques to be carried out for testing the entire product. Here, we will discuss the following topics of Positive Testing:

  1. Introduction to Positive Testing.
  2. Execution of Positive Testing

Let’s start discussing each of these topics in detail.

Introduction to Positive Testing

Positive testing describes how the developed application performs for the valid positive set of data. It is implemented to make sure that how the developed application is helpful to meet the client’s requirements. It also ensures whether all the inputs which are specified in the application are working properly or not.

 Example 1:

Enter Name in Capital Letters: (as Input)

The name is given in capital letters. So, here the requirement meets as we expected. Hence the testing is implemented correctly for Positive Testing.

Example 2:

Enter Name in Capital Letter: (as Input)

The name is given in small letters. So, here the positive testing becomes fail because the entered input is against the requirement and It is considered as negative testing.

Example 3:

 <input type=”file”  accept=”application/pdf” required>

Condition 1: In this, it accepts only the input as file type. 
Condition 2: It will only accept the file type of pdf only. 

If we input the PDF file type, the requirement will get fulfilled. Hence, it is considered as positive testing.

Execution of Positive Testing

Two different techniques can be used for Positive Testing Validation-

  1. Boundary Value Analysis
  2. Equivalence Partitioning

Let’s discuss these techniques in detail.

1. Boundary Value Analysis: It is related to the valid partition in the input data range. It consists of 2 boundary values – upper bound and lowers bound. It checks the value of the lower boundary and upper boundary to ensure positive validation for test cases.


<input type=”number” min=”1″ max=”4″>

1. The range is between 1-4. 
2. The lower boundary value is 1 and the upper boundary value is 4. 
3. It will get the input from this range only. 
4. It will not accept the numbers from out of the given range. 
5. The range from 1-4 is considered as positive test cases.

Let us consider an example

 A= 1, B= 4. 

The Test Cases that we designed are-
A, A+1, B-1, B.

Test Case 1: Accepts A (i.e 1)
Test Case 2: Accepts A+1 (i.e 1+1 =2)
Test Case 3: Accepts B-1 (i.e 4-1=3)
Test Case 4: Accepts B (i.e 4)

These are all Positive Test Cases.

2. Equivalence Partitioning: In this, the test data is divided into ‘n’ partitions, and the input data which satisfies the valid data will be considered as positive test cases for the system.

Example: To appear for a particular exam, one should be above 18 years of age and below 33 years of age. This is the condition to appear for the exam. 

Here the valid partition is in the range of 18-32 and Invalid partitions are <=17 and >=33.

Test Case 1:
if(age>=18 && age<=32)
Then “VALID”

Test Case 2:
if(age <=17)

Test Case 3:
if(age >=33)

Here, Test Case 1 is the only positive test case.
In case of positive testing, it will accept only the test case 1 for the system.

Features of Positive Testing

  • Evaluation of Functionality: Positive testing evaluates the functionality of the software system to ensure that it meets the intended requirements.
  • Accurate Results: This testing methodology aims to provide accurate and expected results by providing valid input data.
  • Detection of Errors: Positive testing helps detect any errors or defects in the software system and ensures that they are identified and fixed during the testing phase.
  • Improved Software Quality: Positive testing plays a crucial role in improving the overall quality of the software system by identifying and fixing issues and defects before the software is released to the end-users.
  • Increased Confidence: Positive testing increases the confidence of the development team and the stakeholders that the software system is functioning correctly and as per the intended design.
  • Time-Saving: Positive testing is a time-efficient method of testing as it focuses on testing the expected functionalities and features of the software system.

Advantages of Positive Testing

  • It takes less time than Negative testing since it covers only valid test cases.
  • It verifies that all the requirements are met.
  • It makes sure that the software is working perfectly as built.
  • Positive Testing saves the efforts of a tester by identifying the wrong build in the initial stages.
  • Verifications of the product will be done with a known set of test cases/conditions.
  • It helps in improving the code ability.
  • Compared to other testing techniques, Positive testing scenarios will have fewer defects count.
  • It accurately tests or checks the expected behavior of the application.

Disadvantages of Positive Testing

  • Positive Testing will not carry out all possible test cases.
  • It will not handle the unexpected error of the product/application.
  • Providing a valid set of data for each test case should be given properly else it will not cover the test cases.
  • Specifying positive test cases for a large number of data require special attention and learning.
  • It does not ensure the accuracy of the product completely.
  • It is less efficient as compared to Negative Testing.

Real-World Examples

1. Online Assessment Platform

  • Situation: Submitting exam answers online.
  • Positive Test Case: Sign in as a student, complete the test questions with appropriate responses, and verify that the answers were submitted successfully and error-free.

2. System for Managing Inventory

  • Situation: Including new items in a stock list.
  • Positive Test Case: Register for an account on the inventory system, input accurate product information, and verify that the new item has been added to the database of inventory.

3. Mobile App Login

  • Situation: Accessing a mobile banking application.
  • Positive Test Case: Verify that access to the mobile banking functions is allowed without any problems by entering valid login information, such as your username and password.

Tools and Techniques

  • Testing for user acceptance (UAT): Enlisting end users to verify the functioning of the programme in ideal circumstances.
  • Testing Using Models: Creating positive test cases that follow the intended behavior specified in the system specifications by using models.
  • Testing Using a Checklist: Creating checklists will help to guarantee that positive test scenarios meet user expectations and corporate needs.
  • Risk-Based Testing: Placing affirmative test cases in order of priority according to possible threats to vital system functionality.
  • Checklists: Generating positive test scenario checklists based on functional requirements and specifications.
  • Continuous Deployment/Continuous Integration (CI/CD): Whenever updates are sent to the version control system, the testing process is automated using programmes like Jenkins or GitLab CI.

Positive Testing Vs Negative Testing

Below are the differences between positive testing and negative testing-

S. No Positive Testing Negative Testing
  1 .  It is always done to verify the known set of test conditions. It is always done to break the product with an unknown set of test conditions.
  2. Positive Testing is carried out by keeping the positive set of views. Negative Testing is carried out by keeping the negative set of views.
  3. It is to check the application with a valid set of data. It is to check the application with an invalid set of data.
  4. It takes less time. It takes more time.
  5. It is less efficient than Negative Testing. It is more efficient than Positive Testing since it covers all possible test cases.
  6. It returns only the expected result. We can find some unexpected results during the testing.

Example: Enter the valid email id in the form by mentioning all the letters in the small case along with @ symbol. – Positive Testing (Expected Result)

Example: Enter the invalid email id in the form by mentioning the letters in uppercase and not properly mentioned @ symbol. – Negative Testing (Error)

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads