Panorama OO-SQA

Basic Concepts

Software quality is the degree to which software possesses a desired combination of attributes. This desired combination of attributes must be clearly defined; otherwise, assessment of quality is left to intuition. An appropriate set of software metrics must be identified in order to measure the software quality attributes.

The purpose of software metrics is to make assessments throughout the software life cycle as to whether the software quality requirements are being met. The use of software metrics reduces subjectivity in the assessment of software quality by providing a quantitative basis for making decisions about software quality. Of course, the use of software metrics does not eliminate the need for human judgement in software evaluations.

OO-SQA provides more than twenty important metrics which reflect not only the basic aspects of the software quality, but also the special aspects of the Object-Oriented software qualities. Use of these metrics will make software quality visible and result in the great improvement of software quality as well as the acceleration of the software development.

More specifically, the use of OO-SQA will:

For different projects or different organizations, the quality requirements in terms of quality factors and sub-factors may differ from each other. So it is essential to allow the selection of the metrics related to the established factors and sub-factors. Meanwhile, the importance of the metrics may be different for established factors and sub-factors. It is also necessary to set the importance of each metric for a particular project.

On the other hand, a good quality assurance tool should enable the managerial and technical personnel to obtain feedback by evaluating the software products and processes at the elementary metrics level, and analyzing the metrics values to estimate and assess the quality factors.

With Panorama OO-SQA, you may specify which metrics you wish to use for a particular project, and specify what weight, or importance, each metric has for the project. You may also specify the acceptable bounds for the values of each metric. The values which fall beyond the acceptable range will be highlighted. The resulting measurements of your program quality are displayed in five forms: Kiviat diagrams, bar graphs, metrics reports, and multiple metrics diagrams.

A Kiviat diagram is a pie-like diagram that contains radially extending lines that each represents a metric and two concentric circles that represent the acceptable bounds for the metrics. The value for each metric is shown as a point on the corresponding line. If the point falls within the bounds, it is considered acceptable.

The weighted Bar Graph shows whether the value for each metrics is acceptable. The area displayed on the Bar Graph is the product of metric value and respective weight. The weight for a certain metric reflects the degree of importance of this metric in the evaluation of the program.

The histogram displays the values for each metrics respectively in a way easy to be understood. It shows the number of classes or functions in the vertical dimension and the values of the classes and functions for the metrics in the horizontal dimension.

The Metrics Report lists the values of metrics obtained from static analysis or dynamic analysis for each class or function.

A Multiple Metrics Diagram is a variation of the Kiviat diagram. The pie in a Multiple Metrics Graph is divided into unequal slices, where each slice represents a metric, and the size of the slice represents the importance of the metric. Points representing metrics values are connected to form a polygon. The size of the polygon can be compared with the size of the goal circle.

The metrics provided by Panorama OO-SQA include:

The metrics above can be selected for functions or classes. The class metric value is the sum of the metric values of all its member function. When "With Base Classes" is selected, the metric values of member functions inherited from base classes are also added to the sum.

The eight object-oriented quality assurance metrics above can be selected for classes only.

OO-SQA can work alone or with other tools of the Panorama Family.

When OO-Test is available, the various accumulated test coverage data can be shown on the metrics diagrams. Without OO-Test, the static analysis result can also be shown on the metrics diagrams.

Operations

This section covers:

Activating Panorama OO-SQA

sqa.gif - 0.71 K To invoke OO-SQA from the Panorama C/C++ MAIN menu:

  1. Make sure that you have created or loaded a database for your project. (See "Creating and Loading a Database")
  2. Click on the OO-SQA button on the tool bar of the MAIN menu. Alternatively, you may click the TOOLS menu, then click OO-SQA option.

    The OO-SQA menu bar will pop up.

    Sqa_bar.gif - 3.87 K

    In the menu bar, the FOLLOW SUBSET check button is set by default. You can unselect it by clicking on the button.

    If you select FOLLOW SUBSET, OO-Diagrammer will show quality analysis data of only the files you have selected in the Panorama C/C++ MAIN Menu. (See "SUBSET pull-down menu".) If you unselect FOLLOW SUBSET, OO-SQA will show the quality analysis data of all the files in the project.

Generating software metrics

  1. On the OO-SQA menu bar, click one of the following metrics format:

    The FUNCTION-CLASS SELECTION dialog box pops up:

    Sqasele1.gif - 3.11 K

  2. Select FUNCTIONS or CLASSES.

  3. Click OK.

    The corresponding METRICS window will pop up.

Reading software metrics

To display the Bar Graph:

Choose BAR GRAPH from the OO-SQA menu bar, select FUNCTIONS or CLASSES on the CLASS-FUNCTION SELECTION dialog box, then click OK. The bar graph for functions or classes will pop up.

Alternatively, you may click BAR GRAPH on the TYPE pull-down menu, a bar graph diagram for function or class will be generated.

For each of the metrics applied, Bar Graph shows the weight (the importance of the metrics) in WEIGHT column and the percentage of code passed or failed in the PASSED and the FAILED columns respectively.

Bar Graph graphically shows the values above. The size of the area for each metrics depends on the percentage and the weight. Blue bars represent PASSED values, and red bars represent FAILED values.

The Bar Graph of functions is shown below:

Sqa_bar1.gif - 16.76 K

The Bar Graphs of classes is shown below. Eight object-oriented metrics are provided for measuring the quality of classes.

Sqa_bar2.gif - 19.32 K

To display the Kiviat Diagram:

Choose Kiviat Diagram from OO-SQA menu bar, select FUNCTIONS or CLASSES on the CLASS-FUNCTION SELECTION dialog box, then click OK. The Kiviat diagram for functions or classes will pop up.

Alternatively, you may click KIVIAT DIAGRAM on the TYPE pull-down menu, a Kiviat diagram for function or class will be generated.

The metrics applied are listed in a Kiviat diagram. The values in MAXIMUM STD and MINIMUM STD columns are specified by the user in a standards (.std) file or by system defaults.

The data obtained from the user’s program are listed respectively in the HIGH VALUE, AVERAGE VALUE, and LOW VALUE columns: the values in blue are in the acceptable range, while the values in red are out of the range.

In a Kiviat diagram, the inner circle represents the MINIMUM STD values, and the outer circle represents the MAXIMUM STD values. Each line extending from the center of the diagram represents a metric. The value for each metric is shown as a point on the corresponding line. If the point falls between the two circles, the value is acceptable.

A polygon can be formed by connecting a set of points that represent values for a particular function or for all the functions. Blue polygon represents AVERAGE values for the program; magenta polygon represents MAXIMUM values for the program; cyan polygon represents MINUMUM values for the program; black polygon represents the actual values for each function.

The Kiviat diagram for functions is shown below:

Sqa_kiv0.gif - 6.14 K

Sqa_kiv1.gif - 10.32 K

The Kiviat diagrams for classes is shown below. Eight object-oriented metrics are provided for measuring the quality of the classes.

Sqa_kiv3.gif - 8.88 K

Sqa_kiv2.gif - 12.07 K

To display Metrics Report:

Choose REPORT from the OO-SQA menu bar, select FUNCTIONS or CLASSES on the CLASS-FUNCTION SELECTION dialog box, then click OK. The reports for functions or classes will pop up.

Alternatively, you may click REPORT on the TYPE pull-down menu, a report for function or class will be generated.

This report lists for each function or class its values for the metrics selected and the name of the file that contains it. Values in red indicate that these metrics values are not in the acceptable range.

The report for functions is shown below:

Sqa_rpt1.gif - 12.67 K

The report for classes is shown below. Eight more metrics are provided for measuring the quality of the classes.

Sqa_rpt2.gif - 29.92 K

To display the Multiple Metrics Diagram:

Choose Multiple Metrics from OO-SQA menu bar, select FUNCTIONS or CLASSES on the CLASS-FUNCTION SELECTION dialog box, then click OK. The multiple metrics diagram for functions or classes will pop up.

Alternatively, you may click MULTIPLE METRICS on the TYPE pull-down menu, a multiple metrics diagram for function or class will be generated.

For each of the metrics applied, Multiple Metrics Graph lists the WEIGHT (the importance of the metric), the AVERAGE metric values for the functions, and the percentage of functions whose metrics value is within (PASSED) or outside (FAILED) the acceptable bound. In the GOALS column, a set of standards values (MAXIMUM or MINIMUM) are listed.

In the Multiple Metrics Diagram, the red circle represents the goal. The circle can be either the inner or the outer bound. As in the Kiviat Diagrams, the inner bound represents the MINIMUM standard values, while the outer bound represents the MAXIMUM standard values.

The polygon is formed by connecting the points that represent the average values for the metrics applied.

The area of the polygon can be compared with the area of the red circle (normalized to the value of 100).

In this example, the inner bound is used as the goal for evaluating test coverage values.

mt5.GIF - 3.46 K

In the following example, the outer bound is used as the goal for evaluating complexity values.

mt6.GIF - 4.40 K

You can select from Multiple Metrics Diagram for functions or for classes.

To display Histograms

Choose HISTOGRAM from OO-SQA menu bar, select FUNCTIONS or CLASSES on the CLASS-FUNCTION SELECTION dialog box, then click OK. The histogram for function or class will pop up.

Alternatively, you may click HISTOGRAMS on the TYPE pull-down menu, a submenu of metrics pops up. Click the metric required, a histogram of the metric selected will be generated.

Sqa_hst2.gif - 6.56 K

In the histograms generated, the vertical axis represent the number of classes for each column, while meaning of the horizontal axis depends on the individual metric.

Basic quality assurance metrics

OO-SQA provides the following metrics which are considered as fundamental for software quality assurance:

Object-Oriented metrics

OO-SQA provides a number of object-oriented metrics, including:

Selecting functions or classes

You can select the functions or classes for which you wish to generate software metrics.

To select functions:

  1. Click BAR GRAPH or KIVIAT DIAGRAM or METRICS REPORT or MULTIPLE METRICS or HISTOGRAM, the FUNCTION-CLASS SELECTION dialog box pops up.

  2. In the FUNCTION-CLASS SELECTION dialog box, select FUNCTIONS, then click OK. The metrics form specified for functions will be generated.

  3. In the metrics diagram or report, click SELECT on the menu bar, then click FUNCTIONS.

    A SELECTION dialog box pops up.

    Sqasele2.gif - 11.10 K

  4. In the SELECTION dialog box, all the functions are listed in the upper selection field.

    You may select the functions for which the software metrics form is to be generated, then click OK. The metrics form will be generated.

    To make selection, you may click to select the individual function, or you may click at one function then drag the cursor to select multiple functions.

To select classes:

  1. Click BAR GRAPH or KIVIAT DIAGRAM or METRICS REPORT or MULTIPLE METRICS or HISTOGRAM, the FUNCTION-CLASS SELECTION dialog box pops up.

  2. In the FUNCTION-CLASS SELECTION dialog box, select CLASSES, then click OK. The metrics form specified for classes will be generated.

  3. In the metrics diagram or report, click SELECT on the menu bar, then click CLASSES.

    A SELECTION dialog box pops up.

    Sqasele3.gif - 9.99 K

  4. In the SELECTION dialog box, all the classes are listed in the upper selection field.

    You may select the classes for which the software metrics form is to be generated, then click OK. The metrics form will be generated.

    To make selection, you may click to select the individual class, or you may click at one class then drag the cursor to select multiple classes.

VIEW menu

To customize the view of a Kiviat Diagram or a Multiple Metrics Diagram with its text section in a different position, click on VIEW in the METRICS window. The items in the VIEW pull-down menu only apply to Kiviat Diagrams and Multiple Metrics Diagrams. These items will become inactive in Bar graph, histograms and Reports.

Setting standard metrics values

For different projects or group of programmers, the quality requirements of the program may be quite different. OO-SQA allows you to set the standard values for the metrics to measure the quality of your source code.

  1. Choose STANDARDS from the OPTION pull-down menu.

    The METRICS: STANDARD dialog box will pop up:

    Sqa_set1.gif - 23.75 K

    The number of metrics shown in the STANDARDS dialog box depends upon whether FUNCTIONS or CLASSES is selected in the FUNCTIONS-CLASSES SELECTION dialog box. If FUNCTIONS is selected, 16 metrics will be shown in this dialog box. If CLASSES is selected, 24 metrics will be included in the STANDARDS dialog box.

  2. Press check buttons to enable or disable the metrics to be shown in the diagrams.

  3. Enter the values in the text fields to specify the maximum, minimum, and weight values for each metric as the standards.

  4. Click OK.

    You can also click one of the other buttons in the action area at the bottom of the dialog box:

Changing colors

OO-SQA allows you to specify the colors of the diagrams and further customize the diagrams.

  1. OO-SQA allows you to specify the colors of the diagrams and further customize the diagrams.

  2. Choose COLORS from the OPTION pull-down menu.

    The COLORS Property dialog box will pop up:

    mt2.GIF - 4.53 K

  3. Press one of the eight radio buttons in the middle of the dialog box to select an item. Then change its colors by moving the red, green and blue sliders on the right.

    You may specify different colors for the following eight elements:

  4. Click on one of the buttons in the action area on the bottom of the dialog box:

    Click OK to accept new setting and close the dialog box.

    Click LOAD to open a file selection dialog box to load a set of colors from a .col file.

    Click SAVE to open a dialog in which you may enter the directory and name of a file for storing the current color settings. The file name must have .col extension.

    Click DEFAULT to set the color values to the default values.

    Click RESET to reset the color values to the original unchanged values.

    Click CANCEL to close the dialog box and discard any changes.

Setting display mode

Use SHOW to choose which items are displayed when showing various metrics diagrams.

To set the display mode:

  1. Choose SHOW from the OPTION pull-down menu. The SHOW OPTION dialog box will pop up.

    mt12.GIF - 3.46 K

  2. SHOW option for KIVIAT DIAGRAM.

    Press check buttons to enable or disable the kinds of polygons to be showed in the kiviat diagram. They are AVERAGE, MAXIMUM, MINIMUM, and SELECTED. The default setting are all selected.

  3. SHOW option for REPORT.

    Press radio button to choose the mode for showing REPORT.

    NORMAL will show a normal report in which the metrics values for all functions/classes selected are displayed.

    DEVIATION will show a deviation report in which only those functions/classes with metrics values out of acceptable range are displayed.

  4. SHOW option for MULTIPLE METRICS

    Press radio button to choose the mode for showing MULTIPLE MERICS.

    GROW will set inner bound as the goal. This can be used to analyze, for example, test coverage. The average values of test coverage for selected functions should be higher than the MINIMUM standard values.

    SHRINK will set the outer bound as the goal. This can be used to analyze, for example, complexity. The average values of complexity for selected functions should be lower than the MAXIMUM standard values.

  5. Click OK to accept the new setting.

Metrics values for classes

The class metric value is the sum of the metric values of all its member functions. When "With Base Classes" on "OPTIONS" pull-down menu is selected, the metric values of member functions inherited from base classes are also added to the sum. When "Without base classes" is selected, only the values of its own member functions are added.

Updating test coverage data

If the software being analyzed is running when OO-SQA is activated, the test coverage results may change from time to time. Click "Refresh test data" on "OPTIONS" menu to include the newest coverage data if generated.

Printing a metrics diagram

To print software metrics on a PostScript printer or to a file in PostScript format:

  1. Choose PRINT from the FILE pull-down menu.

    The PANORAMA METRICS: PRINT dialog box will pop up.

    mt7.GIF - 3.34 K

  2. Select TO PRINTER or TO FILE.

  3. Specify the output destination.

    If you have selected TO PRINTER, enter the device name next to that button.

    If you have selected TO FILE, enter the pathname of the file in the text input area next to that button.

  4. Select paper size:
    A -- 8.5x11 inches
    B -- 11x17 inches
    C -- 17x22 inches
    D -- 22x34 inches
    E -- 34x44 inches

  5. Click OK.

Exiting Software Metrics

To exit the metrics window:

  1. Press FILE to bring up the pull-down menu.

  2. Choose EXIT.

Exiting Panorama OO-SQA

To exit from OO-SQA:

Click QUIT on the OO-SQA menu bar.


back to Table of Contents