A Course in Black Box Software Testing

Examples of Domain Testing

See lecture notes on domain testing (intro) and domain testing (advanced) .

Copyright (c) Cem Kaner, 2004

The essence of domain testing is stratified sampling of a few tests from a huge pool of potential tests.

In domain testing, we partition a domain into sub-domains (equivalence classes) and then test using values from each subdomain.

A domain might involve the values of any one variable or combination of variables. Some books look only at input values, but outputs, intermediate calculations, even configuration variables (such as printer type) are commonly analyzed in practical work in the field.

We define an equivalence class as follows: two values are equivalent if, given your theory of possible error, you expect the same test result from each.

The values that we pick to represent each equivalence class are the most powerful members of each set, the best representatives. A best representative is at least as likely to expose an error as any other member of its set.

We often organize the domain analysis in a tabular format. Glen Myers, The Art of Software Testing, describes the classic format. I prefer this one instead. We'll see it used in the examples that follow.

Variable Risk (Potential Failure) Classes that Should Not Trigger the Failure Classes that Might Trigger the Failure Test (Best Representative) Notes
           
           
           
           

The following examples illustrate the application of this style of analysis.


Copyright (c) Cem Kaner 2004

This work is licensed under the Creative Commons Attribution-ShareAlike License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

These notes are partially based on research that was supported by NSF Grant EIA-0113539 ITR/SY+PE: "Improving the Education of Software Testers." Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.