Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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


So that the model can understand the requirements, you have the option to define invalid constraints (values that can never be tested together), and/or bound constraints (values that can only be tested together) to train the model.

Invalid constraints

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

...

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

Image RemovedImage Added


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”

Image RemovedImage Added


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

Image AddedImage Removed

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:

Tip

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 Xray

...

  • Test Case Designer before you export into Excel (so you can copy and paste the Xray

...

  • Test Case Designer 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.

...

Consider these parameters & values:

Image RemovedImage Added


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

...

When you add a Bound Pair, Xray Enterprise Test Case Designer 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:

...

We would like to exclude combinations like ‘Breed of Animal = Shiba Inu’ and ‘Type of Animal = Cat’ from the generated scenarios. We have 2 breeds for each of the first 2 types of animals. Therefore, we can set up 4 one-way bound pairs from "Breed of Animal" to "Type of Animal":

Image RemovedImage Added

You can check your logic by reading the statement at the bottom of the dialog.

...


First, navigate to Rules→ Constraints. Next, click the toggle to change to Advanced Mode – that is the only way to implement "Skip" constraints:

Image RemovedImage Added

Once in Advanced Mode, we use the following syntax for "Skip" constraints:

...

The final component of "Skip" constraints is the ‘skip to end’ capability. In this case, we can tell Xray Enterprise Test Case Designer that for some parameters values, skip all parameters listed later (below) on the “Parameters” page.

...

Lastly, you can do a quick review of available options & syntax by clicking the “Usage” button in top-right section of the Advanced Mode:


View a Constraint

UI Steps
sizesmall
UI Step

To view constraints, select the option "Rules" and then "Constraints" on the model

Image Added

UI Step

A list with all the bound and invalid constraints will be displayed.

Image Added


Edit a Constraint

To edit a constraint, you need to change view to "bulk" . Then you can edit the constrain type selecting the corresponding operator. 

Image Added

It is not possible to edit a constrain at the Standard View. In the Standard View you are only allowed to delete and create a new constrain.

Delete a Constraint

To delete a constraint, hover the constraint and select the delete option:
Image Added

Another option is to, on bulk view mode, delete the desired constraint line:
Image Added