Tuesday, January 20, 2009

Test Case

A test case is a detailed procedure that fully tests a feature or an aspect of a feature. While the test plan describes what to test, a test case describes how to perform a particular test. You need to develop test cases for each test listed in the test plan.

“A test case is a document specifying inputs, predicts results, and a set of execution conditions for a test item”.

"A test case is a unique combination od input and output."

Test Case gives you a great starting point for writing automation. Writing test cases is a crucial first step before writing test code.

how to design test cases in a generic manner:

1.Understand the requirements document.
2.Break the requirements into smaller requirements (if it improves your testability).
3.For each Requirement, decide what technique you should use to derive the test cases. For example, if you are testing a Login page, you need to write test cases
basing on error guessing and also negative cases for handling failures.
4.Have a Traceability Matrix as follows:

Needs to keep in mind general guidelines that will aid in test case design:

a. The purpose of each test case is to run the test in the simplest way possible. [Suitable techniques - Specification derived tests, Equivalence partitioning]

b. Concentrate initially on positive testing i.e. the test case should show that the software does what it is intended to do. [Suitable techniques - Specification derived tests, Equivalence partitioning, State-transition testing]

c. Existing test cases should be enhanced and further test cases should be designed to show that the software does not do anything that it is not specified to do i.e. Negative Testing [Suitable techniques - Error guessing, Boundary value analysis, Internal boundary value testing, State-transition testing]

d. Where appropriate, test cases should be designed to address issues such as performance, safety requirements and security requirements [Suitable techniques - Specification derived tests]

e. Further test cases can then be added to the unit test specification to achieve specific test coverage objectives. Once coverage tests have been designed, the test procedure can be developed and the tests executed [Suitable techniques - Branch testing, Condition testing, Data definition-use testing, State-transition testing]

No comments:

Post a Comment