A test case is a component that describes an input, action, or event and an expected outcome, to determine if a feature of an application is working as it is meant to or not.
Many times test cases are rejected because of their bad quality of writing. In order to write good test cases, we must depend on a process rather than a person. Test-cases make proof of your work done on testing. It also helps to make a systematic approach as well as make the test case re-usable for anyone.
Here are some effective features of the writing test case:
1. Test Case Naming Conventions
Name the test cases in such a way that anyone else can also refer that them in the future.
E.g. There is a project called “Admin” which has a functional area named “Login”. Use naming convention which will give a brief idea of what the test is for, just by looking at its name.
2. Test Case Description
Test-cases description should define “What you are going to test?”
E.g. Verify on entering more than 255 characters in the First Name field during Sign Up, gives an error message.
3. Assumptions and Preconditions
Make sure to add as much information as possible for any conditions to be met before running the test case.
4. Test Input Data
Give Test Data wherever applicable.
5. Test Steps
It describes the execution steps:
Eg: Enter data in the "First Name" text box, click on the "Save" button, etc.
6. Expected Result
Each test step should mention what you expect as the outcome of that verification step.
7. Maintenance & Updates
Make sure that the Test Cases are always updated whenever you newly introduced changes in the application.
In Cryptex Technologies, we pay special attention to writing test-case after the analysis and before any development process starts.