# How many test cases can I run if I'm using domain testing?

I'd like to understand what is domain testing, and how do we use it to calculate coverage (if possible)? My question is imagine I have 3 loops in series and I'm using domain testing approach how many test cases are necessary to achieve path coverage ?

``````Y=12
Z=2
for (x = 0; x < 10; ++x) {
if (something) {
break;
}
...
}
for (x = 0; x < 10; ++x) {
Y=X+2
...
}
for (x = 0; x < 10; ++x) {
Z=10+Z
}
``````

Domain testing is an umbrella term for Equivalent partition and boundary value analysis. Here, we try to cover all the available behaviours of a system by using the least number of inputs. Here domain means each partition that is created.

Equivalent partition means we divide the inputs into different partitions, here each partition means input value range for which the behaviour of the system is identical (means remains the same)

Boundary value analysis means the boundary values of the partitions we found eg if 1 to 5 is a partition then 1 and 5.

For example, consider a system that takes all non zero positive numbers less than 10.

Here the Equivalent partition would be:

``````**Invalid**: -infinity to 0
**Valid**:    1 to 10
**Invalid**:  11 to +infinity
``````

And the boundary values would be :

``````0,1,10,11
``````

So to test this system you can use all the identified boundary values and any, one value from each partition eg `-10,5,16`