Test Script
Definition
A
test script is a testing work product modeling
a software program (often written in a procedural scripting
language) that executes a test suite of test cases.
Top Of Page
Goals
The goals of a test script areis to automate or document the
following:
- Automate the execution of test cases.
- Support regression testing
Top Of Page
Objectives
To support these goals, the objectives of a single test
script include:
- Execute each test case in the test suite.
- Report the results of the test suite.
Top Of Page
Benefits
A test script provides the following benefits:
- Automates a single test suite, thereby supporting
regression testing.
- Failure to produce test scripts makes regression testing
more expensive and less likely to occur.
Top Of Page
Contents
- Test script objectives
- Test preparation (e.g., to place objects under test into
the appropriate pre-test states)
- Test stimuli (e.g., to send test messages or raise test
exceptions)
- Expected behavior (i.e., test oracle)
- Test reporting script
- Test finalization script
Top Of Page
Stakeholders
Top Of Page
Phases
Top Of Page
Preconditions
A test case typically can be started if the following
preconditions hold:
- The relevant sections of the
project
test plan is completed.
- The relevant team is staffed.
- The relevant requirements, architecture, or design is
completed.
- The relevant item under test is started.
- The relevant test suite is started.
Top Of Page
Inputs
- Work products:
- Stakeholders:
Top Of Page
Guidelines
- Test scripts will be used at all levels of testing (e.g.,
unit testing, integration testing, system testing, and launch
testing).
- If the quality of the test scripts is not at least as
good as the quality of the item under test, then it will be
difficult to know if the defect causing the failure is in the
item under test or in the test script.
- Test cases do not document the results of the tests,
which are documented in the associated test reports.
Top Of Page
Conventions
A test script is constrained by the following
conventions:
Top Of Page
Examples
Top Of Page