16. Context Categories¶
By default, MQC expects each measure configured in the BaseMeasure sheet of the quality model (see Base Measures and Default Values) to be provided for each artifact defined in the project structure configuration (see Artifact Structure) respectively for each imported artifact if no project structure has been applied so far.
Expected data that is not imported for a certain artifact for a certain revision is stated as “missing” to inform the user about e.g. not yet completed tasks.
However, this may produce lots of missing data, especially for the case that some measures may never be provided for a particular artifact.
By using context categories you can define artifact-relevant data, thus configure, which measures (data sources, measurements, and base measures) are expected for an artifact. In that way, data previously stated as “missing” - and probably resulting in bad quality - is treated as “excluded” data. This means it is ignored in availability and quality calculation.
There are two steps required to define context categories:
configure context categories in the quality model (Configuration of Context Categories)
assign configured context categories to artifacts within the project structures (Assign Context Categories to Artifacts).
16.1. Configuration of Context Categories¶
Context categories have to be configured in the ContextCategory sheet of the quality model (see Quality Model Configuration).
For each context category you can define, which data is expected (white list) respectively which data should be excluded (black list). A combination of both is possible (see Figure 16.1).
Expected as well as excluded data has to be defined using comma-separated lists of data sources, measurements and/or measures. Use either the full name or name patterns (including wildcards).
In the given example two context categories are defined. The first one only
includes all data from MXAM and MXRAY. For the second context category MTest is
configured as additional data source, but without the two measures Model
Condition Coverage
and Model Decision Coverage
.
Note
If you leave the “Expect” field empty, all data is expected for that context category. To state that no data is expected at all, use the key word “none”.
If the “Exclude” field is left empty, this means nothing is excluded, but still, the amount of data may be reduced by specifiying expected data.
16.2. Assign Context Categories to Artifacts¶
Use the ContextCategories column in the Artifact Structure sheet of the project structures Excel file (see Project Structures Configuration) to assign the configured context categories to artifacts (see Figure 16.2).
Note
When no context category is assigned, i.e. the field is left empty, all available data is shown for that artifact.
16.3. Apply Context Category configuration to analysis¶
Please note, the context category configuration will NOT automatically be applied to your analysis after loading project structure and quality model. Per default the usage of context categories is disabled, hence, all data is expected and shown for all artifacts (see Figure 16.3).
To apply the context category configuration, enable the Figure 16.4).
check box in the dialog of the configuration panel as shown inWith context categories enabled, for each artifact only expected data is shown in all visualizations (see Figure 16.5). All other data is excluded (white areas of the matrix). By this, you can easily distinguish between not expected data and data that is really missing.
Additionally, only expected data is used for calculating quality for an artifact.
Note
Disabling the check box keeps the imported configuration, whereas it is no longer used. Hence, all visualizations and calculation are updated accordingly.
When context categories have been applied, MQC provides a notification if data
was imported, which is now excluded by means of context categories. Use the
Validate the Configuration
button in the dialog.
This opens a list of notification messages. Notifications related to the
context category configuration are tagged with
ValidationArea = "ImportedButExcluded"
. This may help to define your
context categories in a way that it fits best to your project.