D E V M A T E

Loading

Define Equivalence Classes

You are here:
Estimated reading time: 2 min

We are now going to proceed with our AverageSpeed example and define equivalence classes for input factor duration.

Define a valid Equivalence Class

We are now going to proceed with our AverageSpeed example and define equivalence classes for input factor duration.

Change the name of an Equivalence Class

There are already two equivalence classes predefined per input factor. One valid equivalence class named “valid” and an invalid equivalence class named “invalid”. You probably want to change the name to something more meaningful.

You can change the name of an equivalence class in 3 different ways:

  1. Open the context menu next to the equivalence class and select “Rename”.
  2. Highlight the equivalence class row by clicking on it and press “F2”.
  3. Double click on the name on the equivalence class.

In our example we will change the name of the invalid equivalence class to “zero”

Setting the name of an equivalence class inline

Add an Equivalence Class

Any equivalence class is either valid (highlighted in green) or invalid (highlighted in red).

You can add an equivalence class to an input factor in two different ways:

1. Open the context menu next to the input factor and select “Add Valid/Invalid Equivalence Class”.

Showing how to add a new equivalence class from the context menu

2. Highlight the input factor row by clicking on it and press “Alt+C” for a valid equivalence class or “Alt+V” for an invalid equivalence class.

As you can see once you executed the command a new equivalence class has been added to the the input factor.

Change the type of an Equivalence Class

The type of an equivalence class can be changed from valid to invalid in two ways:

  1. Open the context menu of the equivalence class and select “Toggle Valid/Invalid”.
  2. Highlight the equivalence class row by clicking on it and press “Space”.
Showing how to edit the type of the equivalence class from the context menu

Move Equivalence Classes Up and Down

If you want to change the order of equivalence classes within your input factor you can move them up and down. Again you can do this in the following 2 ways:

  1. Open the context menu of the equivalence class and select “Move Up” or “Move Down”.
  2. Highlight the equivalence row by clicking on it and press “Alt+↑” or “Alt+↓”.

An equivalence class can only be moved within its input factor. So the command “Move Up” does not work on the first equivalence class under the input factor and the command “Move Down” does not work on the last equivalence class in an input factor. In addition, if a method is not static, the first input factor cannot be shifted.

Remove an Equivalence Class from the Test Model

Deleting an equivalence class from an input factor can be done in the following 2 ways:

  1. Open the context menu of the equivalence class and select “Remove”.
  2. Highlight the equivalence row by clicking on it and press “Del”.

If you delete an equivalence class whose representative was already selected in one or more test cases be aware that after the removal no representative for those test cases are chosen and you need to reselect another one again.

Was this article helpful?
Dislike 0
Views: 164

Continue reading

Next: Define Representatives

We use cookies to give you the best online experience. By agreeing you accept the use of cookies in accordance with our cookie policy.

Privacy Settings saved!
Privacy Settings

When you visit any web site, it may store or retrieve information on your browser, mostly in the form of cookies. Control your personal Cookie Services here.

GetResponse, Google Analytics

We use LinkedIn Insight for marketing purposes. You can disable these cookies.

We use Google Analytics for marketing purposes. You can disable these cookies.
  • __utmz
  • __utma
  • _ga
  • _gat

We use GetResponse for marketing purposes. This service cannot be disabled, otherwise the website functions will be limited.

Decline all Services
Accept all Services
Get Free Access Now to
9 eBooks!
All about Automated Software Testing
Proven experts
Learn to save up to 75% of your test efforts
Get Free Access Now!
Get Access Now! & Save 50%
Personal Trainer FREE Nutrition Custom Workout App
Get Access Now!
eBook Download
Enter your details to get your free ebook!
All about Automated Software Testing
Download Free Ebook
SUBSCRIBE
MY WEB
NEWSLETTERS
Lorem ipsum dolor sit amet, consectetur adipiscing