Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Passing unit tests do not necessarily collect coverage. A 0% result usually means either the coverage tool never measured the intended code, or a valid report was not generated, transferred, or matched to the source files being analyzed. First inspect the report created by the test job: if it is also 0%, troubleshoot collection and instrumentation; if it shows coverage, troubleshoot the analysis and CI handoff.

Trace the coverage pipeline from tests to dashboard

A coverage result depends on several separate steps. Tests can pass while any later step fails:

  1. Tests run against the intended code.
  2. A coverage collector instruments or observes that code.
  3. The collector writes raw coverage data.
  4. A report is generated in a format the analyzer accepts.
  5. The report reaches the analysis job and is read from the configured path.
  6. The analyzer matches report paths to the source files it analyzes, and the dashboard displays the intended metric and commit.

Coverage measures which code ran under a coverage tool; it is not the same as test pass/fail status. Coverage.py, for example, documents running code under coverage separately from reporting the measurements and producing formats such as XML and LCOV: Coverage.py documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start by checking the report, not changing settings at random

  1. Reproduce the CI test command. Record the exact command, working directory, environment, build variant, and revision where possible.
  2. Look for coverage-specific output. A test summary such as JUnit or TRX confirms test results, not coverage. If there is no coverage summary or raw data file, check that the collector is installed and enabled in the command or runner.
  3. Locate newly generated files. List files immediately after the tests. Confirm that the report is recent and nonempty instead of assuming its default location.
  4. Open the report or render a human-readable one. Check that it parses, includes the expected application files, and has meaningful line or statement totals. A report containing only test files is not evidence that the production code was measured.
  5. Compare local coverage with the analysis result. If the report itself is empty or zero, focus on collection, instrumentation, scope, or filters. If it has expected coverage, focus on format, configured path, job transfer, source-path matching, and revision.
  6. Read analysis logs. Look for missing, unreadable, unsupported, or unmatched report messages. Use the analyzer’s verbose or debug option if available.
  7. Rerun analysis for the same commit. Confirm that the correct branch and coverage metric changed after the fix.

If the generated report is zero or missing

Confirm that the test run actually enables a collector

Many test runners do not collect coverage unless a plugin, agent, flag, or configuration setting enables it. Verify the exact CI command and that instrumentation applies to the application code, not just the tests. A test passing only establishes that its assertions passed; it does not prove that a coverage tool measured the intended production files.

#1 Best Overall
Gogoonike Adjustable Laptop Stand for Desk, Metal Laptop Riser Holder
  • 【Adjustable & Ergonomic】:This laptop stand can be adjusted to a comfortable height and angle according to your actual needs, letting you fix posture and reduce your neck fatigue, back pain and eye strain. Very comfortable for working in home, office and outdoor.
  • 【Sturdy & Protective】 :Made of sturdy metal, it can support up to 17.6 lbs (8kg) weight on top; With 2 rubber mats on the hook and anti-skid silicone pads on top & bottom, it can secure your laptop in place and maximum protect your device from scratches and sliding. Moreover, smooth edges will never hurt your hands.
  • 【Heat Dissipation】 :The top of the laptop stand is designed with multiple ventilation holes. The open design offers greater ventilation and more airflow to cool your laptop during operation other than it just lays flat on the table.
  • 【Portable & Foldable】:The foldable design allows you to easily slip it in your backpack. Ideal for people who travel for business a lot.
  • 【Broad Compatibility】:Our desktop book stand is compatible with all laptops from 10-15.6 inches, such as MacBook Air/ Pro, Google Pixelbook, Dell XPS, HP, ASUS, Lenovo ThinkPad, Acer, Chromebook and Microsoft Surface, etc.Be your ideal companion in Home, Office & Outdoor.

Check scope, filters, and the tested target

Inspect collector include/omit patterns, package and module selection, analyzer exclusions, and source-root settings. Also verify that the tests exercised the same assembly, package, build output, or source revision the analysis examines. Tests can pass against an installed dependency or stale build while the analyzer scans a different checkout.

Account for subprocesses, shards, and modules

Coverage data may be split across child processes, parallel workers, test shards, modules, or machines. Ensure the collector measures relevant processes, combines their data where required, and generates the report from the combined result rather than one partial worker. Coverage.py documents subprocess and multiprocessing setup, parallel data files, and combining measurements: Coverage.py process measurement and Coverage.py run command.

If the report has coverage but static analysis shows 0%

Use a supported report format and the actual path

Raw profiler data, HTML, JaCoCo XML, Cobertura XML, and LCOV are different outputs. Check the analyzer’s current documentation for supported formats and configure the exact generated report path. For example, GitHub’s repository coverage upload instructions require Cobertura XML, while GitLab’s diff visualization accepts Cobertura or JaCoCo XML; these requirements are specific to those features, not universal analyzer rules. See GitHub code coverage setup and GitLab coverage report artifacts.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
WOLFBOX MegaFlow 50 Compressed Air Duster, 110,000 RPM, 3-Gear Adjustable
  • Powerful Turbo Fan:WOLFBOX MegaFlow 50 electric air duster reaches speeds of up to 110,000 RPM, effectively removing dust and debris. It features three adjustable speed settings to suit different cleaning tasks.
  • Economical and Reusable: Built from durable materials with a long-lasting battery, the WOLFBOX MegaFlow 50 is a sustainable alternative to disposable air cans, enhancing your cleaning experience.
  • Portable and Lightweight: Weighing only 0.45 lb, this compact air duster is easy to carry. The included lanyard ensures convenient use both indoors and outdoors.
  • Wide Application: WOLFBOX MegaFlow 50 electric air duster comes with 4 nozzles, making it suitable for a variety of scenes, such as pc, keyboards, or other electronic devices. It also serves well for home clean and car duster.
  • 3.5 Hours Fast Charging: WOLFBOX MegaFlow 50 electric air duster recharges in just 3.5 hours with a type-C cable. Enjoy up to 240 minutes of use on the lowest setting, with four charging options to suit your needs.To ensure optimal performance of your MF50, please fully charge the battery before use.

Verify the report survives the CI job boundary

When tests and analysis run in different jobs or containers, the report must be uploaded and made available to the consumer job. Check job ordering, artifact paths, cleanup steps, and working directories. A report present in a test job is not automatically present in a separate analysis job.

Match report file names to the analyzed checkout

Compare the file paths recorded in the report with the analysis workspace. Absolute paths from another container root, module-relative paths, case differences, generated-source paths, or a different checkout layout can prevent a match. Where the tools support it, generate and analyze from the same revision and use stable relative paths or configure the correct source-root mapping.

Check branch, commit, and metric

Confirm the analysis uses the intended branch and commit SHA. Also distinguish total project coverage from changed-line or patch coverage: a CI feature may display a percentage parsed from logs, imported report data, or line annotations through separate mechanisms. GitLab documents percentage extraction separately from XML report artifacts and diff annotations: GitLab coverage reporting and GitLab coverage report artifacts.

Rank #3
Sale
Acer USB Hub 4 Ports, Multiple USB 3.0 Hub, USBA Splitter for Laptop/PC 2FT
  • 【4 Ports USB 3.0 Hub】Acer USB Hub extends your device with 4 additional USB 3.0 ports, ideal for connecting USB peripherals such as flash drive, mouse, keyboard, printer
  • 【5Gbps Data Transfer】The USB splitter is designed with 4 USB 3.0 data ports, you can transfer movies, photos, and files in seconds at speed up to 5Gbps. When connecting hard drives to transfer files, you need to power the hub through the 5V USB C port to ensure stable and fast data transmission
  • 【Excellent Technical Design】Build-in advanced GL3510 chip with good thermal design, keeping your devices and data safe. Plug and play, no driver needed, supporting 4 ports to work simultaneously to improve your work efficiency
  • 【Portable Design】Acer multiport USB adapter is slim and lightweight with a 2ft cable, making it easy to put into bag or briefcase with your laptop while traveling and business trips. LED light can clearly tell you whether it works or not
  • 【Wide Compatibility】Crafted with a high-quality housing for enhanced durability and heat dissipation, this USB-A expansion is compatible with Acer, XPS, PS4, Xbox, Laptops, and works on macOS, Windows, ChromeOS, Linux

Language-specific checks and example commands

These are starting points from the respective tool documentation, not universal commands. Adapt package names, versions, paths, and report settings to the project and the consuming analyzer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Python with pytest-cov

A common command that runs tests and emits terminal and XML reports is:

pytest --cov=your_package --cov-report=term --cov-report=xml

Replace your_package with the actual import package or source scope. Coverage.py’s XML command reads .coverage by default and writes coverage.xml; options include a different data file, output path, include/omit patterns, and configuration file. Its documentation notes that [run] include rather than [run] source can preserve complete file paths in XML, which may help path matching: Coverage.py XML command.

Rank #4
Sale
OPNICE Desk Organizer and Accessories, 2-Tier Computer Monitor Stand Riser with Drawer and 2 Pen Holders, Laptop Stand, Office Desk Accessories for Office Supplies, Black
  • 【Ergonomic Design】:OPNICE newly releases the monitor stand for desk organizer! This computer stand elevates your monitor or laptop to a comfortable viewing height, relieving pressure on your neck, shoulders. Ideal for strengthening office organization and increasing comfort levels
  • 【Save Space】:This 2-Tier monitor stand with drawer and 2 hanging pen holders provides ample storage space to keep your office supplies and office desk accessories neatly organized and easily accessible, keeping your workspace tidy and improving your sense of well-being
  • 【Durable and Stable】:The metal computer stand is made of high quality material with sturdy construction, it can easily carry the weight of the display and computer accessories, to ensure stable and non-shaking for a long time, ideal for use in the office, dorm room or home
  • 【Sleek and Aesthetic】:This desktop organizer features a modern minimalist design that blends seamlessly with any office decor. It not only enhances functionality but also adds a touch of style and aesthetic to your workspace, making it an essential piece for your office organization efforts
  • 【Hassle-free Shopping】:OPNICE is committed to providing excellent after-sales service and offers a 100-day unconditional return policy for desk organizers and accessories. Comes with four non-slip pads that are height-adjustable to protect your table from scratches(U.S. Patent Pending)

Java with Maven and JaCoCo

JaCoCo separates agent-based collection from report generation. Check that the test phase runs with the JaCoCo agent and that the XML report goal runs before analysis. Maven Surefire or Failsafe configured with forkCount=0 or forkMode=never prevents tests from running with the configured JaCoCo Java agent. If Surefire uses a custom argLine, preserve the injected JaCoCo argument; JaCoCo documents late property evaluation such as @{argLine}. The commonly used Maven report location target/site/jacoco/index.html is HTML, so do not assume it means an XML report exists or that analysis imports it. See the JaCoCo Maven plugin and JaCoCo prepare-agent goal.

Java with Gradle and JaCoCo

Applying the Gradle JaCoCo plugin with the Java plugin creates a jacocoTestReport task. Its documented default HTML location is build/reports/jacoco/test; check the task’s XML setting and enable XML if the importing tool needs it. Run the report task after tests and verify the actual XML path before analysis: Gradle JaCoCo plugin.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

.NET with VSTest

For VSTest-based workflows, Microsoft documents this command when the Coverlet collector is installed:

Best Value
Office Desk Accessories 2pcs Computer Monitor Memo Board Office Supplies
  • [MULTIFUNCTIONAL]You'll get 2 pieces computer monitor memo boards that you can stick on the left and right edges of your monitor, and they're the perfect office desk organizers and accessories. Computer monitor side panels desktop organizer are suitable for home work or office,bringing convenience. Desktop memo is used to organize meeting memos, important messages, business cards, planning notes.Paste on the message board to keep track of important things and to-do items to prevent forgetting.
  • [🌟HIGHLY QUALITY] The material of computer screen side note holder is transparent acrylic. Durable, simple, stylish, light weight, easy to use, not easy to fall off or break. This cute office supplies for women desk can be used for a long time. This computer desk accessories is waterproof and dirt resistance, and look simple and stylish. The transparent acrylic sticky note holder as cubicle accessories is easy to notice the context of your sticky notes.
  • [📋Easy to use] Office must haves cool office gadgets for desk ready to tear, easy to install and remove, not easy to leave traces. You only need to peel off the protective film on the surface of the computer side board memo, wipe off the dust on the edge of the computer monitor, and then stick the desk essentials for women office on the right or left side of the tape, and you're done. A perfect gift for your colleagues, friends or classmates and family members or relatives
  • [🏢MULTI-SCENE USE] This desk supplies computer memo board can be applied to home and office, clear your office decor for women, suitable for most computer monitors, screens and cabinets, you can put it where you think, this cute office decor serve as a reminder. Stick on the computer side. It’s a good office gadgets can remind work improve office productivity. Pasted cabinets, dressers, refrigerators, walls, etc as cubicle accessories. To make life more orderly.
  • [💌NOTE] The adhesive force of the computer sticky note holder is very strong. It can not be directly pasted on the computer screen. It should pasted on the black edge of the screen. Narrow edge not recommended!!! If you are not satisfied with your purchase, or if the product is damaged or broken in transit, please let us know immediately. We will promptly solve your problem.
dotnet test --collect:"XPlat Code Coverage"

It produces coverage.cobertura.xml beneath TestResults, often inside a generated run-ID directory. Locate the file rather than hard-coding an assumed directory. Microsoft’s built-in collector uses the different friendly name "Code Coverage" and has different output format and location; do not give an importer a binary format when it expects Cobertura XML. See the Microsoft .NET code coverage guide and dotnet test options.

JavaScript or TypeScript with Jest

Jest’s collectCoverage setting defaults to false, so enable it with --coverage or configuration. Review collectCoverageFrom and coveragePathIgnorePatterns for patterns that miss or exclude the intended files. If coverageReporters is customized, it replaces the defaults; ensure the required output, such as LCOV, remains listed. See Jest configuration.

Go

For package unit tests, the Go tool documents:

go test -coverprofile=coverage.out ./...
go tool cover -func=coverage.out

The first command writes the profile and the second reports from it. Check that package selection matches the code the analysis expects. For application or integration tests using coverage-instrumented binaries, Go 1.20 introduced go build -cover and GOCOVERDIR; if GOCOVERDIR is unset, the program can run without emitting coverage data. See Go coverage profiling documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use the observed symptom to narrow the cause

What you observe Likely area What to verify
Tests pass; no raw data or report exists Collector not enabled, installed, or attached Test command, plugin or package, instrumentation, and generated files
Raw data exists; report is missing Report-generation step omitted or reading different data Report command/task, dependencies, working directory, and input file
Local report is also 0% Code under test is not being measured, or scope is filtered Instrumentation, target, include/exclude rules, and child-process coverage
Local report is nonzero; analysis is 0% Import, format, path, transfer, or revision mismatch Supported format, configured path, CI artifact handoff, source paths, and commit
Some modules or files have coverage; others do not Partial aggregation or filters Per-module reports, shard merging, source roots, and include/exclude rules
Report has rows but omits expected application files Wrong scope or file mapping Production-code filters, generated code, path prefixes, and checkout layout
Dashboard remains at 0% after a fix Stale run, wrong branch or commit, or different metric Analysis logs, run SHA, branch, and project-versus-patch coverage
Works locally but not in CI Environment, process, workspace, or pipeline difference Exact command, runtime, containers, parallel jobs, and artifact paths
Integration-tested code is missing Separate runner or collector not included Whether integration tests run with instrumentation and their data is merged

Verify the fix in the pipeline

  • The intended tests run with the coverage collector enabled.
  • Fresh raw data and a supported report are created, and the report lists expected application files with nonzero coverage where appropriate.
  • Parallel or subprocess results are merged before report generation when required.
  • The analysis job receives the same report that the test job generated, at the configured path.
  • Report paths correspond to the source checkout and revision being analyzed.
  • Analysis logs show the report was read and matched, and the dashboard is displaying the intended branch, commit, and metric.

Do not make the percentage appear by excluding all source files: that hides the symptom without establishing a trustworthy measurement.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.