Test Case

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?

  1. Test suite ID: Each test case belongs to a specific test suit. This is the ID used to address it.
  2. Test case ID: To denote the test case.
  3. Test case description: A brief summary of the test case along with its objective.
  4. Test pre requisites: Covers all the chief requirements and preconditions which must be looked into, before executing the test case.
  5. Test case procedure: It is a stepwise strategy to conduct the test.
  6. Test data: Includes all the data and links relevant to the cause of testing.
  7. Expected result: The anticipated conclusions from the test are prepared well in advance for verification with actual results of the test.
  8. Actual result: The results from testing are matched with those from the expected conclusions.
  9. 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.
  10. Test environment: It is the platform on which the test case is to be executed. This maybe an operating system, software or a hardware.
  11. 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.