Coverage Hot! | Bullseye Code
of 100% would be achieved if a single test calls validate_user(25, true, false) . All lines execute. But have you tested all logical possibilities?
set(CMAKE_C_COMPILER "covc" CACHE STRING "") set(CMAKE_CXX_COMPILER "covc" CACHE STRING "") set(CMAKE_CXX_COMPILER_LAUNCHER "" CACHE STRING "") set(CMAKE_C_COMPILER_ARG1 "--compiler" CACHE STRING "") set(CMAKE_CXX_COMPILER_ARG1 "--compiler" CACHE STRING "") export PATH=/usr/local/bullseye/bin:$PATH covselect --add --on # Turn on coverage measurement cmake -DCMAKE_TOOLCHAIN_FILE=bullseye-toolchain.cmake .. covbuild cmake --build . --parallel Step 3: Run Tests & Capture Data cov01 -1 # Reset counters to zero ./bin/my_unit_tests covrun ./bin/integration_tests Step 4: Merge & Report covmerge -a *.cov # Merge all .cov files into one covhtml --title "Sprint 23 Coverage" -o coverage_html coverage.cov Step 5: Set a Quality Gate In your CI script, fail the build if decision coverage drops below 80%: bullseye code coverage
// After Bullseye instrumentation (conceptual) probe_1 = 0; // Counter for the decision if (temperature > 100 && pressure < 50) probe_1++; // Counts entry of the true branch activate_alarm(); of 100% would be achieved if a single
| Tool | Best For | Bullseye Advantage | | :--- | :--- | :--- | | | Rapid iteration, open-source | Bullseye has decision coverage, LLVM only line/function | | Codecov / Coveralls | SaaS dashboards, PR comments | Bullseye works air-gapped (offline) for classified work | | SonarQube | Multi-language, quality gates | Bullseye’s merge engine is vastly superior for embedded | | Parasoft C/C++test | Full SDLC compliance | Bullseye is lighter-weight and cheaper | While open-source tools like gcov (GCC) and lcov
Introduction: The Evolution of Code Coverage Tools In the landscape of software quality assurance, code coverage metrics serve as the bedrock for understanding how thoroughly your tests exercise your application. While open-source tools like gcov (GCC) and lcov are widely known, the commercial sector has long relied on a powerful, precision-focused solution: Bullseye Coverage .
Use Bullseye if you need certifiable decision coverage in C/C++ embedded systems, or if you must merge coverage from thousands of test runs. Use open-source tools for web or mobile apps. Conclusion: Hitting the Bullseye Bullseye Coverage is not a glamorous tool. It has a dated UI, a command-line interface that feels like 1995, and a price tag. However, for safety-critical and mission-critical software, it remains the gold standard for decision coverage.
covmetric -p coverage.cov | grep "Decision Coverage" | awk 'if ($3 < 80) exit 1' The landscape has shifted. Here's when to choose Bullseye vs. newer tools: