Skip to content

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published