
7.3 Concepts of Domain, Open and Closed Domains

In the following sections we discuss the concepts of set theory that would be of great use in domain testing.

7.3.1 A Domain is a set

An input domain is a set. For every domain there is atleast one path in the program. For every boundary there is atleast one predicate that specifies what numbers belong to the domain and what numbers don’t. Domain testing works very well with finite well defined discrete set of data objects that form complete boundaries. Any path in the program that hypothetically corresponds to such boundaries is achievable.

An input domain is a set. For every domain there is atleast one path in the program. For every boundary there is atleast one predicate that specifies what numbers belong to the domain and what numbers don’t. Domain testing works very well with finite well defined discrete set of data objects that form complete boundaries. Any path in the program that hypothetically corresponds to such boundaries is achievable.

7.3.2 Open and Closed Domain

If the points on the boundaries belong to the input domain, then that domain boundary is termed as closed domain with respect to that input domain. If the input values do not fall on or within the boundary then that boundary is a said to be open to those set of input values.

Example: Consider the age of the human being from 0 – 100 years. By assuming the minimum age for voting is 18 years, classify the citizen age into possible domains. Then consider the input value as 4 years and 21 years and discuss the concept of closed boundary and open boundary.

For this particular problem we defined domains D1 and D2 as follows:


Here
Domain D1 is having values between 0 to 18 years.
Domain D2 is having values between >18 years and 100 years
For the input value 4 years, D1 is closed with respect to 4 and adjacent domain D2 is open with respect 4.
For the input value 21 years, D2 is closed with respect to 21 and adjacent domain D1 is open with respect 21.

7.3.3 Domains, Paths, and Predicates

An input domain is a set of values. In domain testing, for every input partition there is atleast one predicate in the program which is having the ability to decide whether the given input falls within the boundary of that input partitions. If so, there is atleast one path in the program that is getting executed.

A linear (boundary) predicate is defined as a relational expression that is having a linear inequality where a relational expressions are having operands which are connected using >, > =, < =, <, < > and =,.

Performing domain testing on loops is very difficult. If the loop has a well defined lower and upper limits then it is possible to decide on exactly how many times that loop is getting executed. Such loop is referred to as definite loop and it is possible to use domain testing. However if the loop are indefinite loop then domain testing will not be effective






Khannur's Book 

Arunkumar Khannur, Software Testing  Techniques and Applications,
Published by Pearson Publications, 2011
(ISBN:9788131758366; Pages:341 + xxii) 
Follow Khannur 

Khannur's Company 

ISQT Process & Consulting Services Pvt. Ltd., Bangalore, INDIA

Khannur's Software Testing Forum 

STEPAUTO Forum

Contact Khannur 
ISQT Process & Consulting Services Pvt. Ltd.
#732, 1st Floor, 12th Main,
3rd Block,
Rajajinagar,
Bangalore  560010, INDIA
Phone: +91 80 23012511
URL: www.isqtinternational.com
Email: khannur@isqtinternational.com
Skype: arun.isqt 
