RAD Studio (Common)
Quality Assurance Facilities

The UML modeling provides audits and metrics as Quality Assurance features to unobtrusively help you enforce company standards and conventions, capture real metrics, and improve what you do. Although audits and metrics are similar in that they both analyze your code, they serve different purposes.  

Audits and metrics are run as separate processes. Because the results of these two processes are different in nature, UML modeling provides different features for interpreting and organizing the results. Note that some of the features and procedures described in this section apply to both audits and metrics while some are specific to one or the other.

When you run audits, you select specific rules to which your source code should conform. The results display only the violations of those rules so that you can examine each problem and decide whether to correct the source code. The modeling feature provides a wide variety of audits to choose from, ranging from design issues to naming conventions, along with descriptions of what each audit looks for and how to fix violations. You can create, save, and reuse sets of audits to run. The modeling feature ships with a predefined saved audit set (current.adt) and you can create your own custom sets of audits to use.

Warning: This feature is available for implementation projects only.

Metrics evaluate object model complexity and quantify your code. It is up to you to examine the results and decide whether they are acceptable. Metrics results can highlight parts of code that need to be redesigned, or they can be used for creating reports and for comparing the overall impact of changes in a project. 

Modeling supports a wide range of metrics. See the descriptions of available metrics in the Metrics dialog box. 

You can define, save, and reuse sets of metrics. 

Along with the full set of metrics, the UML modeling provides tips for using metrics and interpreting results.

Warning: This feature is available for implementation projects only.

Bar chart

Metrics results can also be viewed graphically. Two graphic views allow you to summarize metrics results: bar charts and Kiviat charts. Both charts are invoked from the context menu of the table. Use the Kiviat chart for rows and the bar chart for columns. 

The bar chart displays the results of a selected metric for all packages, classes, and/or operations.  

The bar color reflects conformance to the limiting values of the metric in reference:

  • Green represents values that fall within the permissible range.
  • Red represents values that exceed the upper limit.
  • Blue represents values that are lower than the minimal permissible value.
  • A thin vertical red line represents the upper limit and a thin vertical blue line represents the lower limit.


Kiviat chart

Use the Kiviat chart for rows and the bar chart for columns. 

The Kiviat chart demonstrates the analysis results of the currently selected class or package for all the metrics that have predefined limiting values. The metrics results are arranged along the axes that originate from the center of the graph.  

Each axis has a logarithmic scale with the logarithmic base being the axis metric upper limit so that all upper limit values are equidistant from the center. In this way, limits and values are displayed using the following notation:

  • Upper limits are represented by a red circle. Any points outside the red circle violate the upper limit.
  • Lower limits are represented by blue shading, showing that any points inside the blue area violate the lower limit. Note that blue shading does not show up in areas of the graph with lower limits of 1 or 0.

As the mouse cursor hovers over the chart, the status bar displays information about the metrics or metrics values that correspond to the tick marks.

  • The actual metrics show up in the form of a star with metric values drawn as points.
  • Green points represent acceptable values.
  • Blue points represent values below the lower limit.
  • Red points represent values exceeding the upper limit.
  • Scale marks are displayed as clockwise directional ticks perpendicular to the Kiviat ray.
  • Lower limit labels are displayed as counterclockwise directional blue ticks perpendicular to the Kiviat ray.

Both Audits and Metrics dialog boxes display the set of all available audits and metrics. When you open a project, a default subset is active. Active audits and metrics are indicated by checkmarks. If you open the desired dialog and click Start, all of the active audits/metrics are processed.  

You will not want to run every audit or metric in the default active set every time, but rather some specific subset. Modeling enables you to create saved sets of active audits and metrics that can be loaded and processed as you choose. To do that, use the Load Set and Save Set buttons on the toolbar of the Audits and Metrics dialog boxs. You can always restore the default active set using the Set Defaults button in the Audits dialog. Refer to the Audits dialog for description of controls.  

Use the default active audits set or any saved set as the basis for creating a new saved set. By default, audit sets are saved in the QA folder in the installation directory.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!