Versions Compared

Key

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

Table of Contents

...

Properties

Overview

In T4J you manage the parameters of a test case in the Parameters section of the issue detail view. The parameters are displayed as a table. The table has the following columns:

Parameter Key

The key

...

is the name of the parameter

...

and must be unique within a test case. The key is given when the parameter is created, but can be changed at any time.

Identifier

The identifier

...

is of the following form: ##ParameterKey##and is automatically generated from the parameter key

...

. The identifier can be used within the name, description or expected result of test steps of the same test case.

...

Occurrences of the identifier

...

are replaced with the value of the corresponding parameter

...

when a test case is executed.

Value

The default value of a parameter.

...

The value is given when the parameter is created, but can be changed at any time. The value can be overwritten

...

Views

Issue Detail View

...

in

...

a

...

Displayed properties for each parameter:

  • Parameter Key
  • Identifier
  • Value 

If parameters are used within test steps the identifier is part of the name, description or expected result.
Therefore the identifier will be displayed in the Test Steps section of the issue detail view within those values.
Note that during the test definition the identifiers are displayed not the values of the parameters. The replacement happens only during the execution. 

Test Execution

A single test execution can be started from the definition tree or plan tree via context menu of a test.
A test plan can be executed via context menu in the plan tree or via execution view.

If parameters were used in test steps that are part of the execution, the execution runner will display the (overwritten) value instead of the identifier. 

...

Operations

Using a parameter always consists of three steps which are creating a parameter, using the parameter in test steps and overwriting it's value for test executions.
Since those steps belong to different stages of the primary test management workflow the different operations can be accessed from different views of the plugin.

For each operation the view to access it is indicated. Each operation can be accessed from at least one of the following views:

  • Parameters section in the issue detail view of the corresponding test
  • Test Steps section in the issue detail view of the corresponding test
    To open the issue detail view select the test in the definition tree of a project.
  • Definition tree of a project that contains the test.
    The definition tree is displayed in the definition view of the project or the plan view after selecting a testplan of the project.
  • Plan tree of a test plan containing the corresponding test
    To open the plan tree switch to the plan view and select the test plan that contains the corresponding test.
  • Single Test Executions section of the execution view

Create parameters

Via Add icon

Accessible via Parameters section.

Click on the Image Removed to open the add parameter dialog.

Within the dialog you can enter the initial property values.
Click Add to create the parameter. 

Via Add label

Accessible via Parameters section.

For tests without parameters the Parameters section displays a label reading Click to add a test parameter.
Click on the label to open the add parameter dialog.

Within the dialog you can enter the initial property values.
Click Add to create the parameter. 

Creating multiple parameters

By default the add parameter dialog is closed after a parameter was successfully added.
If you want to create multiple parameters successively open the add parameter dialog and mark Create another checked.
The dialog won't close until you uncheck the option and add a parameter or click Cancel. 

Edit parameters

Accessible via Parameters section.

Click on the Image Removed to open the edit parameter dialog.

The dialog allows you to edit the following properties:

  • Parameter Key
  • Value

Note that editing parameters doesn't affect previous test executions.

Delete parameters

Accessible via Parameters section.

Click on the Image Removed to open the delete parameter dialog.

Deleting a parameter doesn't affect previous test executions.

Use parameters in test steps

Accessible via Test Steps section.

...

test plan or when a single execution of the test case takes place. 

Table of Contents

Parameter Actions

Purpose

Action

Create parameter

  • If the test case has no parameters, select “Click to add a test parameter” and complete the Add parameter dialog.

  • If the test case already has parameters, select the + icon and complete the Add parameter dialog.

Info

To create multiple parameters without leaving the Add parameter dialog, select the option Create another.

Edit parameter

Select the parameter’s edit icon and complete the Edit parameter dialog.

Delete parameter

Select the parameter’s delete icon and confirm deletion in the Delete parameter dialog.

Use parameter in a test step

Insert the parameter’s identifier in the name, description or expected result of a test step.

Note that parameters are test specific and therefore can only be used within test steps of the same test. 

Overwrite parameters

When adding a test to a test plan

Accessible via plan tree.

If you add a test with parameters to a test plan the overwrite parameter dialog opens.

The dialog displays all parameters of the test and their values as currently set in the test definition.

Click Cancel to add the test without overwriting its parameters.

Click Save to add the test and overwrite its parameters.
Note that parameters whose values weren't changed in the dialog are not overwritten. This is important because their behavior differs from that of overwritten parameters.

The identifiers of not overwritten parameters will be replaced with the latest values from the test definition during execution of the test plan.
This also applies if the values are changed later in test definition. 

The identifiers of overwritten parameters will always be replaced with the overwritten value during test execution of the test plan.
The replacement for overwritten parameters happens completely independent from their test definition values.

Overwriting parameters for a particular test plan doesn't change the original test definition values for the parameters.
Neither does it affect other test plans or executions. 

Via context menu

Accessible via plan tree.

Right click on the test whose parameters you want to overwrite and select Overwrite parameters from the context menu.
This opens the same dialog that opens when adding a test to a test plan.
Therefore the same rules stated above apply to overwriting parameters via context menu.

For already overwritten parameters the dialog always displays the overwritten value.
For parameters that aren't overwritten the latest test definition value is displayed.

This way allows later overwriting of parameters as well as editing the values of already overwritten parameters.
It also allows to overwrite parameters created in test definition after the test was already added to a test plan. 

For single test executions

Accessible via definition tree and Single Test Executions section.

Any time you start a single test execution the overwrite parameter dialog opens.

Just like the dialog for test plans it displays all parameters of the test and their values as currently set in the test definition.

Click Cancel to cancel the execution.

Click Continue to start the execution of the test and overwrite its parameters.
Note that parameters whose values weren't changed in the dialog are not overwritten.

The identifiers overwritten parameters are replaced with the overwritten value during this execution.
All other identifiers  are replaced with the current test definition value.

...

Overwrite default parameter values for a single execution

Provide the desired values in the Overwrite parameter values dialog that appears when you start the single execution of a test case.

Overwrite default parameter values for a test plan

Select the desired test case in a test plan and select the entry “Overwrite parameters” in the context menu. Then change the desired values. When the plan is executed, the values of the parameters are determined as follows:

  • overwritten parameter: The changed value is used.

  • non-overwritten parameter: The value in the test case, as currently defined, is used.

  • In the case of a non-overwritten parameter, the value at the time of execution may not be the same as the value when other parameters were overwritten, since the default values of a test case’s parameters may have subsequently been changed.