You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Overview

In specific scenarios, system allows user to define what parameter values can never be tested together or in the other hand, scenarios where paramater values can only be tested together. 
For that, user can apply contraints to support these cases.

Invalid constraints

Invalid constraints restrict parameter values that can never be tested together.


In this example, let's assume Internet Explorer (IE) is not supported on Apple computers so it would be impossible for a tester to execute a test case that instructed them to launch IE from a Mac running on its native operating system. Accordingly, we do not want any tests generated to include combinations such as “OS X” and “IE8” in the same test case.


On the Rules ->Constraints screen, you will need to click on two red X’s. Hover over the first Value of the Invalid Pair and click on the red X that appears


Find the second Value that can never appear together with the first one, hover over it, and click on the red X to create your “Invalid Pair”

As you enter your Constraints, you will see them listed to the left:


Problem solved!

After you enter these two Invalid Pairs, clicking on the “Scenarios” button will create a completely new set of test cases that excludes those two pairs of Values (and only those two pairs of Values). Each test with ‘OS X’ as the operating system will have a browser other than IE.

As you use the Invalid Pair feature and the related Bound Pair one, keep in mind these usage tips:

Do you need to add a lot of Invalid Constraints?

  • Imagine you had an application that asked “Would you like to add a hotel to your travel reservation?” Any scenarios with “Do Not Add a Hotel” would require many, many different Invalid Constraints between things like “Do Not Add a Hotel” and “Hotel Chain Preference = X”. For situations like those, the Bound Constraint feature will help you accomplish your constraint handling much faster.
  • If you have more than 10 or so Invalid Constraints (or Bound Constraints) in your plan, you might find that it is faster to export your plan into Excel and document your paired values in Excel. If so, make sure to both (1) add multiple paired values in DesignWise before you export into Excel (so you can copy and paste the DesignWise formatting for Invalid Constraints and/or Bound Constraints), and (2) ensure that you use the exact spelling of Values (e.g., ‘cutting and pasting’ Values will usually be safer than typing)

Watch out for “Not Applicable” Values.

  • Do you need to add some of them to your plan? Do you need to invalidate the combination of “Not Applicable” with other specific Values?
  • Especially watch out for situations where you have multiple related “Not Applicable” values in a plan. Would it make sense to create a “Bound Constraint” between ‘Hotel Chain Preference = Not Applicable’ and ‘Type of Room’ = Not Applicable’?


Bound constraints

Bound constraints restrict parameter values that can only be tested together.


Imagine that you have these parameters & values…


You will have the following issue when you click on the “Scenarios” button:


Even though the test calls for not adding the hotel, the data row proceeds to specify the preference and type of room, which is clearly incorrect.


To solve this problem, you first need to add “Not Applicable” as parameter values



This is because something will need to appear in test cases that include the value “Do Not Add a Hotel”.

We will want “Not Applicable” to appear for both “Hotel Chain Preference” and “Type of Room” in every scenario that includes the value “Do Not Add a Hotel”.

Side note: the exact syntax of the conditional value and its position in the list don't matter, it could have been "N/A" as the last value.


Next, you’ll want to make sure that “Do Not Add a Hotel” only gets paired with the “Not Applicable” Values. You have two options under the “Constraints” tab. One is quick, the other is slow. Let’s see the slow option, first:

Namely, it’s adding a lot of “Invalid Constraints” as described in the previous article in this section.


This is the quick option… Bound Constraints!

  1. Click on the green arrow icon to the right from the first value name (it appears on hover)



  2. Click on the green arrow icon to the right from the second value name (it appears on hover)

  3. Confirm how you’d like to have the bound constraint operate:

Most of the time when you have “Not Applicable” as an option, you will use “mutually bound constraints” as in this case. Here, we want “Do Not Add a Hotel” to be bound with Type of Room as “Not Applicable” AND we want to have Type of Room of “Not Applicable” to be bound with “Do Not Add a Hotel” so we mark this one as a Mutually Bound Constraint.

Problem solved!


Summary

So what really just happened there?

When you add a Bound Pair, DesignWise will constrain the first value chosen against all the other values in the parameter of the second value chosen. In the example above, creating a bound constraint of ‘Do Not Add Hotel’ and ‘Hotel Chain Preference’ = ‘Not Applicable’ means you are really invalidating these options:

  • ‘Do Not Add a Hotel’ with ‘Hotel Chain Preference = Marriott’ (this combination will never appear).
  • ‘Do Not Add a Hotel’ with ‘Hotel Chain Preference = Hilton’ (this combination will never appear).
  • ‘Do Not Add a Hotel’ with ‘Hotel Chain Preference = Motel One’ (this combination will never appear).
  • ‘Do Not Add a Hotel’ with ‘Hotel Chain Preference = Vivanta by Taj’ (this combination will never appear).

And because we created a MUTUALLY BOUND constraint, we are also invalidating this combinations:

  • ‘Do Add a Hotel’ with ‘Hotel Chain Preference = Not Applicable’ (this combination will never appear).


As you use the Bound Constraint feature, keep the following tips in mind:

  • You can use the Invalid Constraint Feature to accomplish anything that the Bound Constraint feature can do.
  • The Invalid Constraint feature is frequently less confusing for new users . Don’t hesitate to use the Invalid feature instead of the Bound Constraint feature.
  • If you have more than 10 or so Bound Constraints or Invalid Constraints in a plan, you might find that it is easier and faster to document your paired values in Excel. If so, we would recommend (a) adding multiple paired values before you export into Excel, and (b) ensuring that you use the exact spelling of Values (e.g., ‘cutting and pasting’ is usually safer than typing)
  • Especially watch out for situations where you have MULTIPLE related “Not Applicable” values in a plan. Would it make sense to create a “Bound Constraint” between, say, ‘Hotel Chain Preference = Not Applicable’ and ‘Type of Room’ = Not Applicable’? In the example above, it WOULD make sense to include that Bound Constraint. Every time ‘Hotel Chain Preference’ = ‘Not Applicable’ we would want ‘Type of Room’ to also be ‘Not Applicable’ also. Similarly, every time ‘Type of Room’ = Not Applicable, we would want ‘Hotel Chain Preference’ to also be ‘Not Applicable’. This is an example of a type of constraint that the human brain would handle effortlessly without even consciously applying logical rules.


  • No labels