14. Context Categories¶
When defining your Project Milestone Structure in MQC (see Project Milestone Structure), by default each measure imported for a particular artifact for a certain revision is expected for all other artifacts and revisions, too. This may produce lots of missing data, which might not always be what we want.
By using context categories you can assign data sources to artifacts, thus defining, which data (from which data sources) is expected for a certain 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 create your Context Categories: First, specify them within the project structures (Define your Context Categories) and edit them in the Quality model (Add whitelists/ blacklists to your Context Categories).
14.1. Define your Context Categories¶
The “Artifact Structure” sheet of the Project Structures Excel file (see Project Structures Configuration) contains an additional column ContextCategories to specify your own Context Categories (see Figure 14.1).
Note
You can assign any name you’d like, except the string “none” to exclude artifacts completely from your project.
Note
When no Context Category is defined, i.e. the field is kept empty, all available data is shown.
14.2. Add whitelists/ blacklists to your Context Categories¶
With MQC you are able to edit your Context Categories by using whitelists and blacklists, respectively. Within the ContextCategories sheet of the quality model (see Quality Model Configuration) you can assign to your specified Context Category names a comma-separated list of data source names, Measurements, Measures or certain strings of expected data or data that should be excluded. The following figure gives one example of blacklist to exclude all measures from the MTest measure ModelTest starting with the string Model.. and another example of using the whitelist to only consider certain Data Sources (here MXAM and MTest) (see Figure 14.2).
For example, you can expect for a ContextCategoryName one or more Data Sources resp. tool names and exclude only certain Measures, using the following sytax:
MTest.*.*Requirements*, MTest.*.*Total*
Here all MTest measures that contain the string Requirements or Total are excluded from the MQC project.
Please note, configured context categories will NOT be applied automatically after loading a Project Structures and quality model file (see Figure 14.3).
To use the defined context categories, enable the Figure 14.4).
check box in the Settings dialog from the Configuration section of the menu as shown inNow, for each artifact only data from those expected data sources is shown in all visualizations as well as only expected data is used for calculating quality. By this, you can easily distinguish between not expected data and data that is really missing.
On enabling the check box, MQC provides a notification if data was imported that is now excluded by means of context categories. For each artifact you will get a list of not expected data sources. On one hand, this shows surplus data, but it may also indicate an incomplete context category configuration.
Disabling the check box keeps the imported configuration, whereas it is no longer used. Hence, all visualizations and calculation are updated accordingly.