BullseyeCoverage Up Contents Search

Quick Start on Windows

To build your project for code coverage collection, follow the steps below.

  1. If you are not using Microsoft Visual Studio, check for special instructions for your development system.
  2. Enable coverage build with the Coverage Browser menu command Tools Coverage Build, or with the command cov01 -1 or within Visual Studio using the menu command Tools Enable/Disable BullseyeCoverage Coverage Build.
  3. Rebuild and run your instrumented executable as you normally do.
  4. View results by running the Coverage Browser or covhtml.

Installer Command Line Options

-cc compilerList Install compiler integration for the comma-separated list of compilers. To see the currently supported compiler names, invoke the installer with option -help. Specify none for no compiler integration.
-file path Add the COVFILE environment variable to the registry with the value path. The default is Documents\test.cov
-folder path Install BullseyeCoverage to the folder path. The default is %ProgramFiles%\BullseyeCoverage
-help Show command line options and compiler names
-licenseKey string Use license key string
-licenseManager path Configure to use the license manager file named path
-silent Do not display the graphical window interface
-singleUser Install for the current user only

Quick Start on Linux

To build your project for code coverage collection, follow the steps below.

  1. Adjust your project as described for your development system, if needed.
  2. Set the COVFILE environment variable to the path where you want the coverage file created. For example:
    export COVFILE=/source/test.cov     ← Bourne-compatible shell
    setenv COVFILE /source/test.cov     ← C shell
    
  3. Enable coverage build with the Coverage Browser menu command Tools Coverage Build, or with the command cov01 -1.
  4. Rebuild and run your instrumented executable as you normally do.
  5. View results by running the Coverage Browser or covhtml.

Quick Start on macOS

To build your project for code coverage collection, follow the steps below.

  1. Set the COVFILE environment variable using the command below in the Terminal application. Adjust the setting to suit your needs.
    echo "COVFILE=$HOME/test.cov" >"$HOME/BullseyeCoverageEnv.txt"
    
  2. Enable coverage build with the Coverage Browser menu command Tools Coverage Build, or with the command cov01 -1.
  3. Rebuild and run your instrumented executable as you normally do.
  4. View results by running the Coverage Browser or covhtml.

For more detail, see Apple Xcode.

Explore Samples

Sample applications and code coverage results are provided in the BullseyeCoverage/sample directory. To quickly see how code coverage is presented, run the Coverage Browser and open the sample coverage file test.cov in this directory.

You can build and run the sample applications to see how viewing code coverage leads to new test cases. To build a sample application on Windows, open the .sln file in Visual Studio. On Linux or macOS, run make in the sample directory. After building and running the sample, switch to the Coverage Browser and use the command View Refresh to see what has happened in the code.

You can see an example HTML report at bullseye.com/sample/ .

Updated: 5 Jan 2024