Customize Data Coupling Report

The Data Coupling report is based on a template called ccreport.template that you can find in the following folder:
  • In Windows:

    <installation_directory>\HCL\HCLOneTest\Embedded\lib\reports

  • In Unix:

    <installation_directory>/HCL/HCLOneTest/Embedded/lib/reports

Raw data

This template is made of 2 parts:
  • The HTML part that is the common part of all reports,
  • A JavaScript part that sets the tables and call graph depending of 2 variables initialized dynamically when the report is creating:
    var data = {{json}};	    // the raw data
    var d = new Date({{date}})   // the date of the generation
Raw data is composed of 4 sections at the top level:
  • A summary of the Data Coupling metrics:
    • nbGlobalVariables is the number of global variables found in the application.
    • nbDefUses is the number of Def/Use pairs found in the application.
    • nbDefUsesCovered Def/Use pairs found in the application that have been covered by at least one test.
    • nbVariablesWithoutDefUse is the number of global variables that have no Def/Use pairs in the application.
    • variablesWithoutDefUse is the list of global variables that have no Def/Use pairs in the application.

    Control Coupling metrics

  • The list of the modules, each of them has the following information:
    • Name is the short name of the C file,
    • Fullname is the name and path of the C file,
    • uuid is a unique identifier of the module,
    • unknown is set to true is the module is not part of the information you provided (there is only one unknown module that gathers all the call to functions that are not in the known modules),
    • functions is the list of the unique identifiers of functions of the module.

    Modules are listed as hashmap with the uuid, as follows:

  • The list of functions including following information:
    • name is the name of the C function,
    • line is the first line of the function in the module,
    • id is the number used in .tsf file to identify this function,
    • stacksize is the stack size computed during the execution if this option has been set (otherwise -1),
    • uuid is a unique identifier of the function,
    • module is a unique identifier of the module in which the function is declared,
    • calls is the list of the calls in this function. Each of them have the following information:
      • calling_uuid is the unique identifier of the calling function,
      • called_uuid is the unique identifier of the called function,
      • line is the line number of the call in the module,
      • col is the column number of the call in the module,
      • same_module is set to true id the called function is in the same module that the calling function.
    • level is a number that represent the level of the function in the call graph, starting to 0.
    • calledby is the list of unique identifiers of functions that call this one.
  • Functions are listed as hashmap with the uuid, as following:
    Functions are listed as hashmap with the uuid
  • The list of the control flows, each of them have the following information:
    • stacksize is the size computed for this control flow. This value is -1 if the tool was unable to compute.
    • calls is the list of successive calls that composed this Control Flow, each of them have the following information:
      • calling_uuid is the unique identifier of the calling function.
      • called_uuid is the unique identifier of the called function.
      • line is the line number of the call in the module.
      • col is the column number of the call in the module.
      • same_module is set to true if the called function is in the same module that the calling function.
      • alternates is a list of line and column if the function is called several times in this function
    • isRecursive is set to true if a recursive call has been found in this control flow.
      • name is the name of the test case.
      • missingFunctions is the list of functions (name and unique identifier) in the control flow for which there is no stack size.

    Control couplings are listed as an array, as follows:

    control flow

Feedback