Skip to content

qt-learning/C-Cpp-Code-Coverage-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C/C++ Code Coverage Analysis with CoverageScanner

In this directory you can find the starting scripts for a hands-on demonstration of how to instrument C++ code for coverage analysis using Coco's CoverageScanner tool.

Project Structure

The directory contains:

Getting Started

Prerequisites

Windows:

  • Visual Studio C/C++ Compilers (VS 2019 or VS 2022 recommended)
  • Coco installed and available in PATH

Linux/macOS:

  • gcc or clang compilers
  • Coco installed and available in PATH

Building and Running the Tests

On Windows:

coverage.bat

On Linux/macOS:

./coverage.sh

Modifications

The hands-on videos will guide you in modifying the script so that it performs the following:

  1. Compile the code using CoverageScanner (cscl wrapper)
  2. Execute the instrumented binary to collect coverage data
  3. Import the execution results into the .csmes file
  4. Automatically open CoverageBrowser to view the results

The final result can be found in the solutions directory.

Licensing Information

Copyright (C) 2026 Qt Group.
SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

This code repository contains code samples and other materials designed to help you learn and practice C/C++ code coverage analysis with Coco's CoverageScanner tool. The materials provided are intended for educational purposes to help test the skills you've gained from completing the course.

Terms and Conditions

If you, your employer, or the legal entity you act on behalf of hold commercial license(s) with a Qt Group entity, this software package constitutes Pre-Release Code under the Qt License/Frame Agreement governing those licenses, and that agreement's terms and conditions govern your access and use of this software package.

This software package may provide links or access to third party libraries or code (collectively "Third-Party Software") to implement various functions. Use or distribution of Third-Party Software is discretionary and in all respects subject to applicable license terms of applicable third-party right holders.

Third-Party Attributions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors