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 :
So to test this system you can use all the identified boundary values and any, one value from each partition eg
For your given code:
Unless there is a defined behaviour difference for each value of y and z you cannot create a partition table.
There should be clear stating of valid and invalid values for these fields.
From a normal test perspective as there are 3 for loop and, only one for-loop has a condition. you could get 100 % coverage by using two inputs (one to make something false and one to make something true )
As there is no other condition, all the codes will get executed