Monday, May 2, 2011

Test Case

Test Case is playing important role in software testing field. It’s a testing document. Software tester tests the software according to Test Cases because it contains set of conditions and requirements under which a tester will test the application functionality. Test Case is developed by the Test Engineer because he has the sense about Known Input and Expected Result. Test Case contains is totally based on Use Cases documents because all things are related to requirements. When you have collection of test case then you can called it Test Suite. The Test Case documents contain the following information- Purpose, Pre-requirements, Test Data, Steps, and Notes and Questions.
In order to test whole application all the requirement of application must be gathered, there must be at-least two test cases for each requirement. One is Positive Test case and another one is Negative Test; Unless a requirement has sub-requirements. And a sub-requirement is exists than sub-requirement must have two test cases again in the same manner. For keeping the track between the requirement and the test cases Traceability Matrix will be used. These written test cases should include a functionality to be tested.
A formal Test Case will require a known input and by an expected output, which is worked out before the test is executed. Preconditions will be tested by known Input and Postcondition will be tested out by an expected Output.

Informal Test Case
For applications or systems without formal requirements,test cases can be written based on the accepted normal operation of programs of a similar class. In some schools of testing, test cases are not written at all but the activities and results are reported after the tests have been run.
In scenario testing, hypothetical stories are used to help the tester think through a complex problem or system. These scenarios are usually not written down in any detail. They can be as simple as a diagram for a testing environment or they could be a description written in prose. The ideal scenario test is a story that is motivating, credible, complex, and easy to evaluate. They are usually different from test cases in that test cases are single steps while scenarios cover a number of steps.

Test Case Structure
A formal written test case comprises of three parts -
  1. Information
    It contains the general information about the test case. Information incorporates Identifier, test case creator, name of the test case, purpose or brief description and test case dependencies.
  2. Activity
    Activity contains the actual test case activities. Activity contains information about the test case environment, activities to be done after test case is performed,activities to be done at test case initialization, step by step actions to be done while testing and the input data supplied for testing.
  3. Results
    Results are output of a executed test case. Results data contains information about expected results and the actual results.

No comments: