Sei sulla pagina 1di 9

TEST CASES WRITING

Isuru Kodithuwakku

What is a test case?


A test case is a document that describes an input, action or event and an expected response, to determine if a feature of an application is working correctly

IEEE Standard 610 (1990) (1) A set of test inputs, execution conditions, and expected results developed for a particular objective, such as to exercise a particular program path or to verify compliance with a specific requirement.

(2) (IEEE Std 829-1983) Documentation specifying inputs, predicted results, and a set
of execution conditions for a test item. Ron Patton (2001, p. 65) Test cases are the specific inputs that youll try and the procedures that youll follow when you test the software. Boris Beizer (1995, p. 3) A sequence of one or more subtests executed as a sequence because the outcome and/or final state of one subtest is the input and/or initial state of the next. The word test is used to include subtests, tests proper, and test suites.

Why we write test cases ?

The basic objective of writing test cases is to validate the testing coverage of the application

What is expected from a test ?


Find defects Block premature product releases Help managers make ship / no-ship decisions Minimize technical support costs Assess conformance to specification

Conform to regulations
Minimize safety-related lawsuit risk Assess quality

Verify correctness of the product


Maximize the bug count

Attributes of a test case


Test case ID Test case name Objective/Description Priority Requirement Designer name Pre-conditions Steps/Inputs Expected results Actual results Post conditions Execution results(Pass/Fail) Attachments

Qualities of a good test case


Accurate - tests what its designed to test

Economical - no unnecessary steps


Reusable - keeps on going Traceable - to a requirement Appropriate - for test environment, testers Self cleaning - picks up after itself self-explanatory easy to determine the results Simple language and active case while writing test case

Before writing a test case


Read specifications and requirements Be clear with design and implementation details Test data Identify the test environment and test types

Identify all possible scenarios


Be clear of behavior under failure conditions (invalid inputs etc.) Have related information and affected areas of the requirement

Test case writing tools


Visual studio Test manager

Excel
Bugzilla TestLink

HP quality center

Potrebbero piacerti anche