Open In App

Positive Testing – Software Testing

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)
GEEKSFORGEEKS 

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)
geeksforgeeks

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.

Example:

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

Here,
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)
Then “INVALID”

Test Case 3:
if(age >=33)
Then “INVALID”

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

Advantages of Positive Testing

Disadvantages of Positive Testing

Real-World Examples

1. Online Assessment Platform

2. System for Managing Inventory

3. Mobile App Login

Tools and Techniques

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

Example: Enter the valid email id in the form by mentioning all the letters in the small case along with @ symbol.

xyz@gmail.com – Positive Testing (Expected Result)

Example: Enter the invalid email id in the form by mentioning the letters in uppercase and not properly mentioned @ symbol.

XYZgamil.com – Negative Testing (Error)


Article Tags :