The parameter definition of a metric suite can be specified:
- As an attribute with the «ParameterDefinition» stereotype.
- In the body of a metric definition.
If you need to track parameter values, the parameter definition should be specified as the attribute of a metric suite. In this case, each value of the parameter becomes the slot of an instance created when running the metric suite.
If a metric suite is created using the BaseMetricSuite, it already has a few parameter definitions inherited through a generalization relationship, such as scope and coveringScope. If you created a metric suite from scratch or the inherited parameters don't meet your needs, you should specify your own parameter definitions.
To specify a parameter definition as the attribute of a metric suite
- Select the shape of a metric suite.
- Click the Create Element button on the right side of the shape and select Parameter definition. The attribute with the «ParamterDefinition» stereotype is created.

- Type its name directly on the shape, and then click a free space on the diagram.
- Select the attribute on the shape and click
. Select the type of the parameter.
The parameter definition is specified.
Declaring the context
One of the parameter definitions must be declared as the context of a metric suite. If a metric suite has the context declared, then any element, for which you select to calculate appropriate metrics, becomes the value of the context parameter definition of this metric suite and is used for calculating metrics. Otherwise, calculating metrics for the selected element makes no sense (unless the context is declared in the body of a metric definition).
To declare the context for a metric suite
- On the shape of a metric suite, double-click the parameter you need to define as the context for the metric suite. The Specification window of the parameter opens.
- Set the Set As Context property value as true.
- Click the Close button.
The parameter is declared as the context of the metric suite.