Test Cases – Best Practices

What is a Test Case?
A test case is a set of conditions or variables and inputs that are developed for a particular goal or objective to be achieved on a certain application to judge its capabilities or features.
It might take more than one test case to determine the true functionality of the application being tested. Every requirement or objective to be achieved needs at least one test case. Some software development methodologies like Rational Unified Process (RUP) recommend creating at least two test cases for each requirement or objective; one for performing testing through positive perspective and the other through negative perspective.

Test Case Structure
A formal written test case comprises of three parts –

  1. Information
    Information consists of general information about the test case. Information incorporates Identifier, test case creator, test case version, name of the test case, purpose or brief description and test case dependencies.
  2. Activity
    Activity consists of the actual test case activities. Activity contains information about the test case environment, activities to be done at test case initialization, activities to be done after test case is performed, step by step actions to be done while testing and the input data that is to be supplied for testing.
  3. Results
    Results are outcomes of a performed test case. Results data consist of information about expected results and the actual results.

Designing Test Cases
Test cases should be designed and written by someone who understands the function or technology being tested. A test case should include the following information –

  • Purpose of the test
  • Software requirements and Hardware requirements (if any)
  • Specific setup or configuration requirements
  • Description on how to perform the test(s)
  • Expected results or success criteria for the test

Designing test cases can be time consuming in a testing schedule, but they are worth giving time because they can really avoid unnecessary retesting or debugging or at least lower it. Organizations can take the test cases approach in their own context and according to their own perspectives. Some follow a general step way approach while others may opt for a more detailed and complex approach. It is very important for you to decide between the two extremes and judge on what would work the best for you. Designing proper test cases is very vital for your software testing plans as a lot of bugs, ambiguities, inconsistencies and slip ups can be recovered in time as also it helps in saving your time on continuous debugging and re-testing test cases.

Article from Buzzle

Leave a Reply