Let’s see our first example
Let’s assume that we have a field in a website that accepts
So, If we write test cases using Test Case Design Technique, then we can use 2 Techniques
As per Boundary Value Analysis, There will be 6 Test Cases will come up
As per Equivalence class Partitioning, 3 Test Cases will come up
So, We have seen in the above, what is negative test case and what is a positive test case.
Let’s take 1 more example to understand positive testing and negative testing.
Let’s take an example of login functionality.
If we want to test login functionality of any application, then we will have to use Decision Table Testing Technique while writing test cases.
As per Decision Table Testing Technique, We are going to get below test cases.
Test Cases | Test Case 1 | Test Case 2 | Test Case 3 | Test Case 4 |
---|---|---|---|---|
User name | True | False | True | False |
Password | True | True | False | False |
Login | Successful | Failed | Failed | Failed |
Type of Testing | Positive Testing | Negative Testing | Negative Testing | Negative Testing |
So, this is how we perform positive testing and negative testing in case of login functionality.
Now, If we want to define positive testing and negative testing, then it would be
When we perform testing on a software application with valid input data, then this type of testing is called Positive testing.
When we perform testing on a software application with invalid input data, then this type of testing is called Negative testing.
Positive and Negative Testing is very important due to below reasons
We have covered below topics in this session.
Give an example of Negative Testing from eCommerce Application.
Objects, Classes and Constructor in Javascript Classes and Objects A class in any programming language…
We will start from object oriented programming basics like What are different concepts in Object…
Why we can not over ride a Constructor This is a very important question, that,…
What is Arrow Function In the last session, We had discussed about Anonymous Function. Anonymous…
What is Anonymous Function Anonymous Function is a type of function which has no name…
What is Map, Reduce and Filter Map Filter and Reduce are higher order methods for…