About Data Coupling

Data Coupling is defined as “the manner or degree by which one software component influences the execution of another software component” in the Clarification of Structural Coverage Analyzes of Data Coupling and Control Coupling document edited by the Certification Authorities Software Team (CAST). The purpose is 'to provide a measurement and assurance of the correctness of these modules/components’ interactions and dependencies'. Data Coupling I sused to verify that all the global variables of the application under test have been consumed in read (also called use) and write (also called def) during the tests.
HCL OneTest™ Embedded introduces a new coverage level call “data coupling” for C language that consists to verify that all the global variables of the application under test has been consumed in read (also called use) and write (also called def) during the tests, as following:
  • For each global variable, HCL OneTest Embedded identifies the def and use. Then it considers all the possible def/use pair as a data coupling.
  • To cover a Data Coupling, i.e. a def/use pair, this def and this use must be executed from at least one test.

HCL OneTest Embedded provides a new interactive HTML-based report for Data Coupling.

To identify Data Coupling instances, HCL OneTest Embedded analyzes all the global variables of the application, where they are read and written. For one global variable, each pair of write and read constitutes an instance of Data Coupling.

For each data coupling, HCL OneTest Embedded provides the following information:
  • The name of the global variable.
  • The def position (file name, line, and column).
  • The use position (file name, line, and column).
  • The list of test cases that covered the Data Coupling.
  • The list of requirements that are relative to these test cases.

How Data Coupling works

HCL OneTest Embedded identifies the position if the def/use using coverage information. When you select the Data Coupling option, some coverage options are set automatically: blocks, calls and conditions.

Coverage files (.fdc and .tio) are the input of the report generator that produces a report in HTML format (and optionally the raw data can be generated in a Json file). A template is provided for this generator. You can provide your own template to modify the report.

If the Data Coupling feature is used with unit testing feature, the report generator could take as input the .tdc files. This allows to have also in the report the test cases that covered each Control Coupling and the associated requirements declared in the .ptu file. If not, the test cases are identified by its execution date, and there is no requirement.

Feedback