logo
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:
Image without caption
Then write the firat parameter weight:
Image without caption
then click on the + icon to add the second parameter:
Image without caption
that is price:
Image without caption
then select the type of the parameter:
Image without caption
that is decimal:
Image without caption
After setting ‘decimal’ to the price as well, the next step is to add the requirement label, such as R1:
Image without caption
The next step is filling the predicate for R1: weight < 5 and price <= 100:
Image without caption
Just fill the field with 5 and 100 and click on ‘=’, select less than for 5 and less than or equal to 100:
Image without caption
The next step is to add the response ‘delivery is free’:
Image without caption
You can add step for R2 and R3, by clickin on ‘Add section’:
:
Image without caption
For R3, when weight can be anything, select ?:
Image without caption
You can check the tests by clicking on ‘Show all test cases’:
Image without caption
The result is:
Image without caption
Share