STM_4.ppt - DOMAIN TESTING Programs input data are...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
DOMAIN TESTING Programs input data are classified. Domain testing attempts to determine whether the classification is or is not correct. If domain testing is based on specification it is a functional test technique; if based on implementation it is a structural technique. Domain testing is usually applied to one input variable or to simple combination of two variables. All inputs to a program can be considered as if they are numbers. A routine must classify the input and set it moving on the right path. input classify Do case1 Do case2 Do case3 Do casen Output Fig: Schematic representation of domain testing
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Partition the input vector into cases. An invalid input is just s “reject” case. A domain is a set. Domain testing uses set theory . Domains, paths and Predicates : In domain testing, predicates are assumed to be interpreted in terms of input vector variables. A domain for a loop free program corresponds to a set of numbers defined over the input vector. For every domain there is at least one path through the routine. Domains are defined by their boundaries, boundaries are defined by predicates. Domain boundaries are also where most domain bugs occur. With three binary predicates there are up to 8 domains, corresponding to 8 possible combinations of True/False outcomes of the three predicates. Note: There must be at least one boundary predicate or there is nothing to test from the point of view of domain testing, however there is no limit to the number of boundary predicates. Domain Closure : One dimensional domain is a domain defined over one input variable. A domain boundary is closed w.r.t a domain if the points on the boundary belong to the domain. If the boundary point belong to some other domain, the boundary is said to be open .
Background image of page 2
min max D1 D2 D3 (a) Both sides closed (b) One side open © Both sides open Fig: open and closed domains. In the above figure there are three domains, D1,D2,D3. In fig(a) D2’s boundaries are closed both at the minimum and maximum values of variable “x”; that is, both points belong to D2. If D2 is closed w.r.t x, then the adjacent domains D1 and D3 must both be open w.r.t x. In fig.b, D2 is closed on the minimum side and open on the maximum side, meaning that D1 is open at the minimum of D2 and D3 is closed at D2’s maximum. In fig.c D2 open on both sides, which means that those boundaries are closed for D1 and D3.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Domain dimensionality: Every input variable adds one dimension to the domain. One variable defines domains on a number line, two variables define planar domains, three variables define solid domains, more than 3 variables define hyper planes. Domain dimensionality does not depends on number of boundary predicates.
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 26

STM_4.ppt - DOMAIN TESTING Programs input data are...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online