What is a Test case?
A test case is a set of conditions, test data and anticipated results prepared to verify compliance of a software functionality against the specific requirements for which the software or application is developed. Writing a test case brings a definite level of standardization to the testing process rather than the slipshod manner it would have been carried out without it.
What are the parameters involved in writing a test case?
- Test suite ID: Each test case belongs to a specific test suit. This is the ID used to address it.
- Test case ID: To denote the test case.
- Test case description: A brief summary of the test case along with its objective.
- Test pre requisites: Covers all the chief requirements and preconditions which must be looked into, before executing the test case.
- Test case procedure: It is a stepwise strategy to conduct the test.
- Test data: Includes all the data and links relevant to the cause of testing.
- Expected result: The anticipated conclusions from the test are prepared well in advance for verification with actual results of the test.
- Actual result: The results from testing are matched with those from the expected conclusions.
- Status and remarks: Denotes if the tests have been executed and if the application under test has passed or failed the test case. Also includes remarks for improvement in the test case.
- Test environment: It is the platform on which the test case is to be executed. This maybe an operating system, software or a hardware.
- Other parameters: Other parameters which form part of the test case include a mention of the testing date, author of the test case, date of creation of the test case, etc.
Example of a test case
- Suppose we have to check an input field that can take in a maximum of 7 characters. With a test case having such a scenario we first initiate with a test step involving the feeding of 7 characters.
- Now the expected result of taking such a test step is that the input field must accept all the 7 characters fed.
- The actual result is the accepting of all the 7 characters. In this test case if the actual result is same as the other parameter i.e. expected result, then the application is said to have passed the test case.
- On the other hand we feed 8 characters as an alternative test scenario, and the expected result is the non acceptability of 8 characters. If the actual result comes out as admitting of 8 characters, then the application is said to have failed the test case.