Key Points of Effective Test cases for the Application
Posted By : Sana Khan | 25-May-2020
A test case is a set of instructions, which has a set of test data, preconditions, expected results and postconditions, developed for a particular test scenario in order to verify compliance against a specific requirement.
Test Case acts as the input for the test execution, and after applying a set of input values, the application has a definitive outcome.
A Test case should be :
- Easy to understand and execute.
- Easy to trace as per requirements.
Test cases include :
1.Test Case ID:Test case should include ID.
2.Test Case Type (Positive / Negative): Defines the type of test case.
3.Description:Brief detail about what is going to be tested.
4.Test Data:That is to be used while conducting the test.
5.PreCondition:Preconditions that must be fulfilled prior to executing the test.
6.Test Environment:(Hardware/Software/Network) in which the test was executed.
7.Priority:By this we categorize the test case(High/Low/Medium).
8.Status:It involves the status of a test case after performing a test,whether a test case was passed or failed.
9.Steps for Execution: Steps we follow to execute the test case.
10.Expected Result:Result which we are expecting.
11.Actual Result:The result which we get after execution.
12.Comments:Any comments on the test case or test execution.
13.Date of Execution: Execution date of test cases.
Best practices to write a test case: We can achieve this by following steps.
1.Test Case needs to be simple and transparent.
2.Write test steps anyone can follow.
3.Aim For 100% Test Coverage.
4. Prioritize Your Test Cases.
5.Using Correct Naming Conventions.
6.Test case should not be repetitive.
Why we write test cases:
- To have full test coverage.
- To have consistency in test execution, if we maintain a test case there is always an increase in the performance of a tester.
- When we write test cases it is easy to remember all the scenarios.
- It is easy to give training to new employees when we have test cases .
- Easy to automate:if you are planning to do automated tests in your project, these detailed test cases are perfect inputs for your test automation.