Domain testing is important to detect errors in the control flow of a system. It’s a general method of boundary value analysis. Domain analysis involves three steps. The first is to select the predicates. The second is to extend predicates to remain valid, considering the other predicates. The third step is to create the domain table. Based on the domain table, Harmony generates reliable and almost optimal test cases.
Creating a domain table is tiresome, but applying AI-powered test design, AI will do it.
Considering the example requirements below, Step 1 is the following:
R1: IF weight < 5 THEN delivery is free
R2: IF weight >= 5 THEN delivery price = weight in euros
R3: IF price > 100 THEN delivery is free
You can see that R3 influences R2, as the output changes if price > 100. Therefore, we need to modify R1 and R2 in Step 2:
R1 extended: IF weight < 5 AND price <= 100 THEN delivery is free
R2 extended: IF weight >= 5 AND price <= 100 THEN delivery price = weight in euros
R3 remains
Now we can start creating the domain table. Let’s selecti Domain Table:
Then write the firat parameter weight:
then click on the + icon to add the second parameter:
that is price:
then select the type of the parameter:
that is decimal:
After setting ‘decimal’ to the price as well, the next step is to add the requirement label, such as R1:
The next step is filling the predicate for R1: weight < 5 and price <= 100:
Just fill the field with 5 and 100 and click on ‘=’, select less than for 5 and less than or equal to 100:
The next step is to add the response ‘delivery is free’:
You can add step for R2 and R3, by clickin on ‘Add section’:
:
For R3, when weight can be anything, select ?:
You can check the tests by clicking on ‘Show all test cases’:
The result is: