All Collections
Hexawise Features
Scenario Generation
How can I get every value to appear without increasing my tests?
How can I get every value to appear without increasing my tests?

Using one-way (1-way) coverage to ensure each Value for a specific Parameter is tested once (without guaranteed interaction coverage).

Ivan Filippov avatar
Written by Ivan Filippov
Updated over a week ago

Let's set the context and the problem we're trying to address.

Let's say that we are testing a mortgage application process. We know what needs to be tested regarding applicant details and loan details. As we begin collecting information on the property details, we realize that there might be an issue. We provide mortgages in all 51 states. If we wanted pairwise coverage for all those states, our number of tests generated would be quite large, more than 150 tests.

Our stakeholders have asked to have a test for every state. Our subject matter experts have assured us that the business rules aren't tied to the state itself but type of property. Therefore, the state doesn't need to be tested with every other parameter. This is a great situation to use 1-way testing.

Determining the 1-way coverage we want

1-way coverage can be applied in two fashions:

  • To every parameter

  • To a specific parameter(s)

Let's look at both and see which fits the situation we are currently facing.

Option 1: Applying 1-way strength to every parameter

Just like selecting any coverage strength, select "1-way interactions" from the drop-down list. Hexawise will regenerate your scenarios for the 1-way interaction strength.

You'll receive a warning about creating a 1-way test model

Creating an entire test model on the 1-way strength produces a warning dialog. 1-way strength doesn't guarantee coverage of pairs or any other combination, so it's important to understand the implications of this interaction strength.

Make sure you really understand the implications of a 1-way test model

Clicking "1-way interactions means..." (appears in the popup when you hover over the "i" icon) will open a dialog box with an example of what 1-way strength means for your particular model.

Back to our model ... is a 1-way strength model really what we need?

With 1-way interaction strength, we have 51 scenarios for 51 states. That requirement is checked off. But under closer inspection, we don't have property type paired with every value from every other parameter. This will not go over well with our subject matter experts and business stakeholders.  So, while having a model of all 1-way strength interactions could be appropriate, it is not for our mortgage example.

Option 2: Selectively applying 1-way strength in our model

So, a 2-way model creates too many scenarios, and a 1-way one doesn't get the coverage we need to satisfy all of our requirements. Our next option is to selectively apply 1-way strength to certain parameters.

Applying 1-way with the Mixed-Strength feature

To selectively apply the 1-way interaction strength, we first choose Mixed-strength from the dropdown on the Scenarios page. Then, we choose "1-way" from the dropdown located above the "Location of Property" parameter. For this example, we'll keep all of the other parameters at the 2-way interaction strength. Lastly, we click "Reapply".

As we can see in the picture above, we have 51 tests. So we have one test for every state - requirement satisfied. Since we've also left the other parameters at the 2-way strength, Hexawise will guarantee pairwise coverage for those parameters -requirement satisfied. We've successfully created a test model that includes the variation of our business needs, achieves coverage for our important parameters, and does it all in an optimized scenario suite.

For more on the mixed-strength feature, please read the help file located here.

What if we needed to have the states paired with every other parameter?

This example produced a test set that has a test for each state, but does not guarantee coverage of every state with every other parameter value. If we needed to have every state paired with every value, we could create a two-way scenario set. That would be a lot of tests. To overcome that issue, we might consider using equivalence classes with the Value Expansion feature.

Did this answer your question?