Testwell CTC++ Code Coverage Analyzer

description

For C and C++

Testwell CTC++ was originally developed for source code in the C language. It supports C++ for over 30 years and continuously keeps pace with its highly dynamic language standards.

The C language family has some special challenges for coverage measurement:

  • Source code in header files – this is merged for all of its copies by Testwell CTC++.
  • Use of macros – Testwell CTC++ instruments the already preprocessed code and thus gains access to the complete macro content.
  • Code variants through preprocessing: In safety-critical software development, variants must be tested separately. Testwell CTC++ recognizes variants and identifies them separately.

An add-on is available for the Java language.

 

Coverage Measures

Testwell CTC++ offers all coverage measures required by various safety standards:

  • Function Coverage
  • Statement Coverage
  • Decision / Branch Coverage
  • Condition Coverage
  • MC/DC: Modified Condition / Decision Coverage
  • Multicondition Coverage

 

 

Executed, non-executed and only partially executed lines of code are visually highlighted (Line Coverage).

 

Safety-Critical Software Development

When human lives are at risk, various safety standards such as ISO 26262 in the automotive sector or DO-178C in aviation require the measurement of code coverage.

Several hundred companies worldwide use Testwell CTC++ in this development environment to cover all coverage requirements of their standard up to the highest required level of MC/DC.

 

 

Testwell CTC++ is certified by TÜV Süd for functional safety in accordance with IEC 61508, ISO26262, EN 50128 and IEC 62304.

 

Testing

All types of tests, whether unit tests, integration tests or complete system tests, can be carried out as usual. Testing can be done fully automated, partially automated or manually.

The instrumented program or test executable writes the data to a file during testing. When the test is executed on a target, this writing out is fully customizable; the data can, for example, be transferred directly to the host.

With Testwell CTC++, all test runs of a project can be combined into a single report. It works with all common unit test tools, test platforms and frameworks.

 

Flexible Reporting

Our HTML report offers overview views and shows the details of the coverage measurement in the source code. Its reporting levels can be configured to suit the project.

Testwell CTC++ creates all coverage reports based on templates and thus supports all text-based formats such as XML, CSV or JSON. This way, third-party systems such as dashboards can easily be supplied with the required data.

 

 

Missing coverage is explained and documented via Justifications. Testwell CTC++ shows the impact of Justifications on all coverage measures – so it is clear and transparent whether 100% of the code has been tested or at least explained.

 

Embedded Software

The coverage measurement for software on embedded targets has some specific challenges:

div

Low Memory The instrumentation overhead is basically low and can be further reduced through various workflows. In extreme cases, the coverage is measured over individual bits and can be read out via the debugger.
Coverage Data

Any communication interface between target and host can be used for writing out coverage data.

The runtime library for writing out the coverage data is supplied as C code that can be adapted to the capabilities of the target.

Cross-Compiler Testwell CTC++ works independently of the compiler and can be configured for any C / C++ compiler. We provide our users with numerous compiler configurations and support them in adapting to new compilers.

 

Files and media

upbtn