Академический Документы
Профессиональный Документы
Культура Документы
Practice exercise
A mortgage system will provide a discoilnted mortgage to those applicants
with a salary of between t20,000 and fso,000 (inclusive) per annum.
t '
;4:
'r
Create test cases for both valiO biiO invaticJ partitions
.p\
Partition
Classification
Expected
t
result
Value
0 99
Partition
Classification
Expected
result
Value
For the purpose of this course we are focusing on inputs. ln fact, we are
simply skimming the surface of the technique - it can be a lot more involved
that the examples covered by this course.
o
Equivalence partitioning is suitaUe for@)test levels from component through
to acceptance testing.
From this example code, we can see that it is not necessary to test every age
for the first requirement. Only one value is necessary to test the 0-17 range.
The system will treat each value from 0-17 the same, therefore each value is
as good as each other.
Any value within a partition is, in terms of testing, the same as any other value
in that partition.
Therefore;
Overview
Equivalence partitioning is a technique that is used to reduce the number of
test cases required. As exhaustive testing is not possible, equivalence
partitioning gives us a manageable subset of test cases with minimal loss of
coverage.
How it works
lmagine you are testing a life assurance system. There is an input field where
the user enters the age of the applicant.
o
To validate the age entered, the developer will use code such as
a The knowledge and experience of people are used to derive the test
CASCS
a Models, either formal or informal, are used for the specification of the
problem to be solved, the software or its components.
ID Unique id
Pu
Describe the purpose of this procedure. lf this procedure execufes any test
cases, provide a reference for each of them.
S cial uirements:
ldentify any special requirements that are necessary for the execution of this
o
procedure. These may include prerequisite procedures, special skil/s
requirements, and special environmental requirements.
Procedure ste
lnclude following fhe sfeps as applicable
Log: Describe any special methods or formats for logging the results of fest
execution, the incidents observed, and any other events pertinent to the test).
Set up; Describe the sequence of actions necessary to prepare for execution of the
procedure.
Shut down: Describe the actions necessa4/ fo suspend lestrng, when unscheduled
events dictate.'
Restart: ldentify any procedural restart points and describe the actions necessary to
restaft the procedure at each of these points.
Contingencies: Describe the actions necessa4y to deal with anomalous events that
may occur during execution.
ID: Unique id
Test items:
ldentify and briefly describe the items & features to be exercised by thls tesf
case-
ln uts ifications:
Specify each input required to execute the test case. Some of the inputs will
be specified by value (with tolerances where appropriate), while others, such
as constant tables or transaction files, will be specified by name. ldentify all
appropriate databases, files, terminalmessages, memory resident areas, and
o values passed by the operating sysfem.
Environmental needs:
Hardware: Specify the characferisfics and configurations of the hardware
required to execute lhis fesf case.
S uirements:
ural
Describe any special constraints on the test procedures that execute fhis fesf
case. These constraints may involve special set up, operalor intervention,
output determination procedures, and specialwrap up.
lntercase de encies
List the identifiers of fesf cases that must be executed prior to this tesf case
Summarise the nature of the dependencies.
ID: Unique id
Features to be tested:
ldentify the test ifems and describe the features and combinations of features
that are the object of this fesf specifrcation.
roach refinements:
o
Specify the refinements to the approach described in the fesf plan. lnclude
test techniques to be used. The method of analysing results should be
identified (comparator program or visual inspection).
Specify the results of any analysis that provides a rationale for fesf case
selection. For example, one might specify conditions that permit a
determination of error tolerance (e.9. lhose conditions that distinguish valid
inputs from invalid inputs).
Summarise the common attributes of any fesf cases. This may include input
constraints that must be true for every input in the set of associafed /est
cases, any shared environment needs, any special procedural requirements
and any shared case dependencies.
Test identification o
List the identifier and a brief description of each test case associated with this
design. A pafticular fest case may be identified in more than one fest design
specification. List the identifier and a brief description of each procedure
associafed with this fesf. design specification.
Test condition
An item or event that could be verified by one or more test cases
Test case
A set of inputs, execution preconditions, and expected outcomes developed
for a particular objective
Test procedure
Detailed instructions for the execution of one or more test cases
Examples of the above forms based on lEEEB29 Standard for software test
documentation can be found on the next 4 pages.
The various test procedures and automated test scripts are subsequently
formed into a test execution schedule that defines the order in which the
various test procedures, and possibly automated test scripts, are executed,
when they are to be carried out and by whom. The test execution schedule
will take into account such factors as regression tests, prioritisation, and
technical and logical dependencies.
qr'
.;$
:6t
:r.
(
o
)) Durino test desion the test cases and test data are clealed i.nd 9p ecified. A
test case consists of a set of inpg! l1flgeq, execution preconditions, expe cted
results and execution post-conditions, developed to cover ce rtain tebf
condition(s). The 'Sta ard for re test documentation' (IEEE 829)
describes the content of test design specifications (containing test conditions)
and test case specifications.