3.33.3. Configuring Teststyle for a Project
Prev | 3.33. Working with the Teststyle guidelines | Next

### 3.33.3. Configuring Teststyle for a Project

When Teststyle has been activated for a Project (Section 3.33.2, “Activating Teststyle for a Project”), you can configure:

- which guidelines should be used (Section 3.33.3.1, “Activating and deactivating individual guidelines”)

- what kind of a message a flouted guideline should show (information, warning or error) (Section 3.33.3.2, “Setting the message level for guidelines”)

- the attributes for a guideline (Section 3.33.3.3, “Configuring the attributes for guidelines”)

- the contexts a guideline should be active for (Section 3.33.3.4, “Configuring the contexts for guidelines”)

#### 3.33.3.1. Activating and deactivating individual guidelines

In the Project properties, under the Teststyle section, you can activate and deactivate guidelines for use in the Project:

1. When Teststyle is enabled for the Project (Section 3.33.2, “Activating Teststyle for a Project”), select the checkbox for an individual guideline to activate it for the Project.

2. Deselect a checkbox to deactivate the guideline.

   | When you select a guideline, the description text gives you more information on what the guideline is for.

3. You can (de)select all the guidelines in a category by activating or deactivating the checkbox for the category name.

4. You can also use the buttons ”Select All” and ”Deselect All” to (de)select all the guidelines.

5. Click ”OK” in the Project properties to save the changes.

6. If your current Project flouts any of the guidelines that are set, then you will see entries in the Problems View notifying you of the places where guidelines are being flouted. For more information on working with the Problems View to fix tests, see the section later (Section 3.33.4, “Working with the Problems View to view and fix Teststyle problems”).

#### 3.33.3.2. Setting the message level for guidelines

For each guideline in the Project properties, you can decide how you want to be notified that the guideline is not being upheld.

The choices available are:

Information:

  Information is shown in the Problems View using a blue icon. Elements in the test are not decorated with information messages.

Warning:

  Warnings are shown in the Problems View using a yellow icon. Warnings are also shown on elements in the test (e.g. Test Cases.

Errors:

  Errors are shown in the Problems View using a red icon. Warnings are also shown on elements in the test (e.g. Test Cases, Test Suites. If a Test Suite contains a Teststyle error, it will not be executable via the ITE.

To set the message level for a guideline:

1. In the Project properties, under the section Teststyle, select the guideline you want to configure.

2. In the combo-box on the right-hand side, select the level of message you want to receive if this guideline is not upheld.

3. Click ”OK” in the Project properties to save the changes.

#### 3.33.3.3. Configuring the attributes for guidelines

For many of the guidelines in the Project properties, you can define the values or quantities for the aspects it checks. For example, you can edit the attribute Maximum number of parameters for the guideline that specifies the maximum amount of parameters on a Test Case.

To edit the attributes for a guideline:

1. In the Project properties, under the section Teststyle, select the guideline you want to configure.

2. Click ”Edit attributes” to open the attributes dialog.

3. In the dialog (Figure 3.42, “Edit Attributes”), you can see and edit the values for any editable attributes for this guideline.

4. Confirm your changes in this dialog using ”OK”.

5. Click ”OK” in the Project properties to save the changes.

| If you enter an invalid value, the default value will be used in its place.

Figure 3.42. Edit Attributes

#### 3.33.3.4. Configuring the contexts for guidelines

For many of the guidelines in the Project properties, you can set the contexts they should be valid for. Some of the available contexts include Test Cases, Test Suites, or the whole Project.

To edit the context for a guideline:

1. In the Project properties, under the section Teststyle, select the guideline you want to configure.

2. Click ”Edit context” to open the context dialog.

3. In the dialog (Figure 3.43, “Edit Contexts”), you can see and edit any available contexts for this guideline.

4. To activate a context, select the checkbox next to it. To deactivate a context, deselect its checkbox.

5. Confirm your changes in this dialog using ”OK”.

6. Click ”OK” in the Project properties to save the changes.

| If you enter an invalid value, the default value will be used in its place.

Figure 3.43. Edit Contexts