What is Test Case?
- A test case is a set of predefined operations performed to verify the specific functionality or feature of a software application.
- Test cases include specific inputs already defined and mentioned in the Test Case document and results generated against them to make sure the particular feature is working correctly or not.
- Test engineers can use these variables or conditions to match expected results with the actual results to conclude whether the software application or product is operating under the client requirements or not.
What are the elements and attributes of Test Cases
Following are the essential elements and must be required for writing a test case document.
- Test Case ID
- Test Case Description
- Test Steps
- Test Data
- Testing Environment
- Expected Result
- Actual Result
- Status
- Comments
How to Document Test cases
Test Case ID
ID or number for the test case.
Test Case Description
Summary or purpose of the test case.
Test Steps
If any steps required to execute the test case
Test Data
Data for testing and evaluating the test case
Testing Environment
Testing environment should be mentioned while writing test cases. For Example specific browser, device or screen resolution.
Expected Result
Result according to the requirement document/ Assumed output of the system
Actual Result
Result generated by the software or actual output
Status
Pass or Fail. Defines test case pass or not
Comments
Important note while executing the test case
Sample Example For Writing Test Case
Test Case
ID TC-1001
Test Case Description
User should be login successfully on clicking on the login button by entering a valid user name and password.
Test Steps
Go to Home page.
Click on the login link.
Test Data
Add registered User Name
Add valid password
Expected Result
User should be login to the app.
Actual Result
User login successfully
Status
Pass
Comments
No Remark.
Characteristics of a good test case
- A test case is written must be simple and transparent.
- No need to add extra content.
- Test case must be unique.
- Test cases easily traceable to requirements.
- Do suppose or assume by your self.
- Cover all software requirements defined in the specification document.
- Make sure to cover all positive and negative scenarios.
- No grammar mistakes.
- No spelling mistakes.