Powered By Blogger

Wednesday, January 4, 2012

Format of test case and how to write a good test case


Few things need to be considered for writing good test case.

  1. Test Case ID - Unique Number, simple to use and follow. Break scenario in sessions and use id like 1.1, 1.2 etc to track specific sessions.
  2. Objective of Test case - Should be clear and should convey what exactly is expected out of it. Avoid using negative sentences in objective. Try to make it easy but grammatically correct in order to convey the similar message to all.
  3. Prerequisite -Minimum requirement that should facilitate execution of test case. E.g. Login is  not possible if users do not exist or user has not signed up for application.
  4. Steps - Steps needed to execute that test case. It should be exact clear and should also include observations, executions.
  5. Expected result- What you are expecting after the execution of the test case. Should be part of or elaboration of the objective, use "Should" word in the sentences.
  6. Actual Result - PASS - write same as expected, FAIL- give exact description.
  7. Issue ID - If there is variation from expected behavior then write its Defect id i.e. the unique number generated by bug tracking tool or manual.
Remember :
Good test case should lead to bug and should be easy to execute.