Writing & Tracking Test Cases
Writing & Tracking Test Cases
Why?
Organization.
Repeatability.
Tracking.
Proof of testing / not testing.
Goals of Test Case Planning?
Organization:
Even in small project possible to have
thousands of tests cases.
Test cases may be created by several testers
over a long span.
Proper planning will organize test cases so
that all testers and other project members
can review & use them effectively.
Goals of Test Case Planning?
Repeatability
Necessary to run the same tests cases
several times to look for new bugs.
Without proper planning it would be
impossible to know what test cases were
last run and how they were run.
Keeping info on this will help to repeat the
exact tests.
Goals of Test Case Planning?
Tracking
We may to answer several questions like:
How many test cases planned for run?
How many test cases were run in the last
release?
How many passed & how many failed?
Any tests cases skipped?
Planning would help to answer these
questions easily.
Test Case Planning Overview
TEST PLAN
Increasing
Emphasis on
Process of
Planning
Test Design Test Design
Spec Spec
Increasing
Test Procedure
Test Case Emphasis on
Spec
Spec
Written Plan
Test Design Spec
Take the high level overall test plan.
Break it into specific features and testable
items.
Assign the items to individual testers.
Only general mention of automation,
black-box or white-box.
No details.
Where to get next level of detail??
Go to test design specification.
What is Test Design Spec?
ANSI/IEEE 829:
Refines the test approach defined in the test
plan.
Organizes and describes the testing that
needs to be performed on a specific feature.
Identifies:
the features to be covered by the design
Identifiers:
A unique identifier used to reference and
locate the test design spec.
The spec should reference the overall test
plan.
Should contain pointers to any other plans
or specs that it references.
Parts of Test Design Spec
Features to be Tested.
Description of s/w feature covered by the
test design. Ex. “The addition function of
Calculator”.
Also identify features that may be indirectly
tested as a side effect of testing the
primary feature. (UI for load/stress)
Also list features being covered in this plan
but wont be tested.
Parts of Test Design Spec
Approach
Description of the general approach that will be
used to test the features.
Expand on the approach to describe the technique
to be used and explain how the results will be
verified.
Ex. A testing tool will be developed to sequentially
load and save pre-built data files of various sizes.
The # of data files, sizes and the data they contain
will be determined through black-box tests and
supplemented with white-box. A pass or fail will
determined by comparing using the file compare
tool.
Parts of Test Design Spec
Test Case Identification
Pass/Fail Criteria
Test item
Describes the detailed feature, code module and
others being tested.
More detailed description than test design spec. Ex.
Test Design Spec: “The addition function of
Calculator”.
Test Case Spec: “Upper limit handling of addition
calculation”.
Parts of Test Case Specification
Input Specification:
Lists all I/Ps or conditions given to the s/w
to execute the test case.
Ex. To a calculator addition function it
would be 1+1
Output Specification:
Describe the result expected from
executing the test case.
Ex. Did 1+1 =2?
Parts of Test Case Specification
Environmental Needs:
H/w, s/w, test tools, facilities, staff etc
needed to run the test case.
Test Outline:
The item in the test case spec from which
the test case derived.
Helps to track traceability.
Test Case Presentation:
Table Format
Prior State:
Idle state
Successful execution of another test.
Input:
The input sequence to be entered by the tester.
Expected Results:
Behaviour the tester expects to observe.
Actual Results:
To be recorded after execution.
Test Case Presentation:
Table Format
Test Test Prior Input Expecte Actual
Case Outline State d Results
ID Results
T-1 1.1.1.1 Idle 199 Display:
Error