Everybody can write a test case. What’s difficult is writing an effective test case. Luckily it’s a learnable skill, but it requires in-depth knowledge of the software it is written for.
Before we start writing one let’s ask “What is a test case?”. A test case can be defined as “a set of conditions or variables under which a tester will determine whether a software, or a piece of it, works correctly”.
So what are the characteristics of an effective test case?
An effective test case:
- should be accurate and test what it is intended to test
- should be short and easy to understand and follow (if given to a new member he/she should be able to understand it and quickly start to carry out the tests )
- should test only one thing
- should be consistent
- should not contain unnecessary steps
- should not depend on other test cases
The test case fields should contain the following elements:
Test Case Title: Make it simple, but descriptive.
Purpose: A short description about the aspect of the system that is being tested. If this gets too long you can (and should) break it down further
Prerequisites: Which conditions must be met before the test can be run (e.g., “Logged in”)
Test Data: Possible values and data used in testing (e.g., “LoginID”, ”Password”). The values should be listed one per line (e.g., loginID = Valid loginID, invalid loginID, valid email, invalid email, empty, etc.)
Steps: These are the steps to carry out the test. An example using the “Logged in” prerequisite from above would be:
- visit LoginPage
- enter userID
- enter password
- click login
- etc.
Results: This field should contain the expected and actual results of the test.
Notes: This field should contain various notes and questions about the testing.
You should try writing a couple of test cases using the above format. This is only a sample. Test Cases can be more or less complicated, more or less detailed. Hopefully these tips have given you a basic schema to start writing effective test cases.
Similar Posts from the author:
- Regression testing
- How to make your software testing more efficient
- How to test different resolutions – Part one – Chrome resolutions testing
- Creating a Website Testing Plan
- Genymotion review
Recent Comments