**Test Case Execution**

In the last session, We had discussed about Test Cases, which is one of the Testing Terms, and In this session, We are going to discuss another Testing Term, which is Test Case Execution.

**What is Test Case Execution**

- This is the most important stage in Software Testing Life Cycle.
- First we start writing Test Scenarios.
- Once we are done with writing Test Scenarios.
- We start writing Test Cases.
- Once we are done with writing Test Cases.
- We start executing Test Cases.
- When we execute a Test Case, then we note down the Test Result.
- We call this Test Result as Actual Result.
- We compare this Actual Result with Expected Result and if both are same, Test Case is considered as Passed but if both are not same, then it is considered as Failed.
- Whenever a Test Case is Passed, testing is considered as complete for that test case.
- Whenever a Test Case is Failed, a defect is raised for the same, and assigned to developers, So that the developer can fix the defect, when the developers fix it, We Test the Test Case again and it is called as Retesting and it will continue until the Test Case is Passed.

**Example of Test Case Execution**

Let’s take an example of a Project, where developers are building or developing a calculator. A Calculator will have some functionalities like Addition, Subtraction, Multiplication and Division.

So, the First thing that we will do is, Write Test Scenarios.

Then we will write Test Cases

So, Below could be the Test Scenarios Example.

**Test Scenarios Examples**

- Add 2 numbers – Test Scenario 1
- Subtract 2 numbers – Test Scenario 2
- Multiply 2 numbers – Test Scenario 3
- Divide 2 numbers – Test Scenario 4

Now, Let’s see the possible Test Cases for these Test Scenarios.

Test Scenario | Test Case |
---|---|

Add 2 Numbers | Adding 2 positive numbers and check the outcome |

Add 2 Numbers | Adding 1 positive number and 1 negative number where positive number is bigger than negative number and then check the outcome |

Add 2 Numbers | Adding 1 positive number and 1 negative number where negative number is bigger than positive number and then check the outcome |

Subtract 2 numbers | Subtract a small number from a big number |

Subtract 2 numbers | Subtract a big number from a small number |

Subtract 2 numbers | Subtract a positive and a negative number |

Multiply 2 numbers | Multiply a positive number and a negative number |

Multiply 2 numbers | Multiply two positive numbers |

Multiply 2 numbers | Multiply two negative numbers |

Now, We will execute these Test Cases.

**Here is the Test Case Execution Example for the those Test Cases**.

Test Scenario | Test Case | Test Data | Expected Result | Actual Result | Status | Defect No |
---|---|---|---|---|---|---|

Add 2 Numbers | Adding 2 positive numbers and check the outcome | 4+2 | 6 | 6 | Passed | NA |

Add 2 Numbers | Adding 1 positive number and 1 negative number where positive number is bigger than the negative number and check the outcome | 4+(-2) | 2 | 2 | Passed | NA |

Add 2 Numbers | Adding 1 positive number and 1 negative number where negative number is bigger than the positive number and check the outcome | 2+(-4) | -2 | 2 | Failed | 123 |

Subtract 2 numbers | Subtract a small number from a big number | 4-2 | 2 | 2 | Passed | NA |

Subtract 2 numbers | Subtract a big number from a small number | 2-4 | -2 | -2 | Passed | NA |

Subtract 2 numbers | Subtract a positive and a negative number | 4-(-2) | 6 | 2 | Failed | 124 |

Multiply 2 numbers | Multiply a positive number and a negative number | 4*(-2) | -8 | -8 | Passed | NA |

Multiply 2 numbers | Multiply two positive numbers | 4*2 | 8 | 8 | Passed | NA |

Multiply 2 numbers | Multiply two negative numbers | (-4)*(-2) | 8 | 8 | Passed | NA |

**Summary**

We have discussed below topics in this session.

- What is Test Case Execution Process
- How to do Test Case Execution
- Example of Test Case Execution

**Question**

Question for this session is, How will do Test Case Execution for Login Functionality in any Website.