Control Coupling Report

Depending on the build settings, from HCL OneTest Embedded V8.2.0, you can get a Control Coupling report with module as compilation unit as module or a Control Coupling report with module as Function as module as a result to a project build.

The default Control Coupling report is in HTML format. It is generated from a template named ccreport.template (for the option module as compilation unit"), or ccfreport.template (for the option "module as function") provided as text file that you can modify to customize the report. It uses 4 online JavaScript libraries:
  • Bootstrap,
  • JQuery,
  • Font Awesome,
  • VisJS.
These libraries are not provided. You need an internet connectivity when you open the report. If not, download the libraries (.css and .js files), copy them in the same folder than your report, and modify the template file as follows:
Replace the following lines:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.css">
…
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.js"></script>
With the following ones:
<link rel="stylesheet" href="./bootstrap.min.css>
<link rel="stylesheet" href="./all.css">
<link rel="stylesheet" href="./vis.min.css">
…
<script src="./jquery-3.3.1.slim.min.js"></script>
<script src="./popper.min.js"></script>
<script src="./bootstrap.min.js"></script>
<script src="./vis.js"></script

If you set a module as a compilation unit in the control coupling properties, you get a control coupling report with compilation unit in output of your project build. If you set a module as a function, you get a control coupling report with function as module. For more details on the control coupling settings, see Set Control Coupling options for HCL OneTest Embedded for Eclipse IDE. In a report with function as module, the report shows all the function calls (internal and external).

The Control Coupling report is made of three parts.

Summary

In the Summary section, you find the number of Control Couplings for your application that have been covered, given the information you provided and the percentage of Control Couplings that have been covered.

A graph displays the global percentage of covered and not covered control couplings for all the application.

The Summary table displays the following information:
  • The percentage of Control Couplings of your application by pair of modules that have not been covered, given the information you provided.
  • The percentage of Control Couplings that have been covered by pair of modules.
Control Coupling Report - Summary

Details

The Details table lists all the Control Couplings and displays for each of them the following information:
  • The calling compilation unit.
  • The control flow, for example: the successive calls in the module that end with the external call in the called module. Note that the called module is mentioned in the last function of the control flow. In case of option "module as function", this control flow contains only two functions.
  • A check mark if it is a longest Control Flow (only if the option "module as compilation unit" is set).
  • A check mark if it is a shortest Control Flow (only if the option "module as compilation unit" is set.)
  • The list of test cases that covered this control flow. If the Control Coupling feature has been set with the unit testing feature, the test cases are the one in the .ptu files named as <service>/<test>.
  • The associated requirements. If the Control Coupling feature has been set with the unit testing feature, the requirements are those that have been described in the .ptu files with the keyword REQUIREMENT for each test cases that covered this Control Coupling.
  • A check mark if the control coupling has been covered.

Call Graph

For each compilation unit, a partial call graph displays all the functions as an interactive call graph from left to right or from top to bottom, depending on the selector button position on the top of the call graph.

You can select a control coupling in the table to highlight it in the call graph.Control Coupling Report - Call Graph
At the end of the report, a complete Call Graph displays all the functions calls.

Filters

Filters can be applied in the report with different buttons at the top:
  • If the option “module as compilation unit" is set, you can choose first to display all Control Couplings, the longest (only the Control Couplings that have the longest control flow in the calling module) or the shortest (only the Control Couplings that have the shortest control flow in the calling module). The summary tables and the details table are updated accordingly to your selection. This option applies to reports with compilation unit as module only.
  • You can select the calling modules and the called modules. It filters the Control Couplings depending on their calling and called modules. The summary tables and the details table are updated accordingly to your selection.
  • You can choose to display all the graphs or hide them in the report.
  • You can show or hide the Requirements.