17. Context Categories¶
By default, MQC expects each measure configured in 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).
17.1. Configuration of Context Categories¶
Context categories have to be configured in the quality model (see Context Categories).
17.2. Assign Context Categories to Artifacts¶
Once you have defined context categories as groups of expected respectively unexpected data, such a group may be assigned to one or multiple artifacts using the name of that group as configured in the quality model.
Artifacts: - Name: EV3Control_main - Name: ObstacleDetection ContextCategories: - MLC_CC - Name: GlobalPosition ContextCategories: - Global_CC - Name: ManageVehicleStates ContextCategories: - MLC_CC
When no context category is assigned, i.e. the field is left empty, all available data is shown for that artifact.
17.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 17.2).
To apply the context category configuration, enable the Figure 17.3).check box in the dialog of the configuration panel as shown in
With context categories enabled, for each artifact only expected data is shown in all visualizations (see Figure 17.4). 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.
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.