Writing or Creating Test Cases is one of the important activity performed by the tester in the Software Testing Life Cycle(STLC). But creating effective test cases is an important skill and which can be improved by in depth study of application.
What is test case?
A test case is a set of actions performed on a system to determine if it satisfies software requirements and functions correctly.
Test Cases should be small, isolated and atomic. They should be easy to understand and steps should be clear. Steps should be independent and clear. Each good test should have defined its expected result.
What all fields needs to be included in test case?
1. Test Case ID
Unique Test Case Identification Number
2. Module name or Requirement ID
Module name or Requirement ID mentioned in the System Requirement Document and Traceability Matrix
3. Risks & Assumptions
If any risks or assumptions known
4. Test Data
Test data required for executing the test case.
5. Test Steps
Detailed steps for test case execution
6. Expected results
How application should behave after executing the above testing steps
7. Result
Pass or Fail
8. Comments
Some additional information for developer to reproduce the defect or some observation.
How To Write Effective Test Cases?
While writing the test cases you need to follow some steps to make sure that you will write good and effective test cases.
- Identify The Scope And Purpose Of Testing
- Define the testing activities and steps for each testing type
- Identify Non-Functional Requirements
- Define the automation Test Strategy for Regression
- Understand the application in depth.
- Test cases should have very good test case coverage.
- Test Cases should have good coverage with less no. of steps.
- Test Case should be written by applying test case design techniques.
- Test Case should be simple to understand.
- If test cases given to any new Tester, he/ she should be able to execute the test cases without asking any questions or clarifications.
- Test Case should be written in test case template.
- Test Case should be consistent, means flow or sequence should be good.
- Test Case should consists of both positive and negative scenarios.
- Test cases should be able to catch the defects.
- Test cases should not be redundant, means no duplicates.
- Test Cases should be very easy to convert into Automation scripts.
These are the characteristics of Good Test Case.
Final Thoughts:
A test case is to be written to check if features of application are working as expected. Basically a test case contains Test Case ID, Test Steps, Expected result, Result fields. While writing test case keep in mind that all test cases should be simple and easy to understand. First you should cover the Functional test cases then you should include the non-functional test cases. Both test cases are equally important to improve the quality of application.
Thanks for reading my article. Hope you liked it!!!
Happy Testing !!!!