5,402 questions
1
vote
0
answers
37
views
Why doesn't pytest-cov fail with a non-zero exit code when code coverage threshold isn't met, when running on multiple directories?
When the average test coverage threshold across multiple modules isn't met, pytest doesn't fail with a non-zero exit code, even though it should.
My command:
❯ pytest --cov module1 --cov module2 --cov ...
1
vote
2
answers
210
views
Visual Studio Code Coverage Reports Not Listing Or Highlighting All Tested Code
using Visual Studio 17.14.18
I'm asking Visual Studio to give me a code coverage report, which it does. But there are lots of methods being used by the completed / passing tests that are not included ...
0
votes
0
answers
58
views
How to measure .NET MAUI application code coverage triggered by Appium UI automation tests?
I have a .NET MAUI application (targeting .NET 9) that runs on Windows.
In the same repository, I also have a separate Appium-based UI automation project (using .NET 8), which drives the MAUI app ...
0
votes
1
answer
40
views
How to collect code coverage for an IIS-hosted web application during manual/automated UI tests using dotCover CLI in Azure DevOps pipeline?
I’m trying to generate a coverage report for an ASP.NET application hosted on IIS using JetBrains dotCover CLI in an Azure DevOps pipeline.
I can achieve this manually using dotCover standalone and ...
0
votes
0
answers
25
views
Ignore compiled files in .NET 9.0 code coverage report
I have an ASP.NET Core 9 Web API project and in the Azure DevOps pipeline, there are compiled files being collected for coverage - and there is no test code for those. For example the Mediator Library....
2
votes
1
answer
79
views
SonarQube shows 0% coverage for Angular (LCOV exists) while .NET coverage is OK
I run a single batch script to analyze a mixed solution: .NET backend + Angular frontend.
The .NET coverage (OpenCover) is imported correctly, but Angular/TypeScript coverage always shows 0% in ...
0
votes
0
answers
42
views
Is it possible to collect code coverage for a shared library (.so) without using an executable file in LLVM?
I am working with an Android application (APK) that uses JNI and depends on a shared library. I modified the build parameters to include code coverage instrumentation. After running the APK on an ...
0
votes
1
answer
38
views
Differential code coverage policy at folder level in ADO pull requests
I'm exploring the usage of azurepipelines-coverage.xml to enable differential code coverage policy.
I would like to know if this supports a sub-folder level target for differential code coverage.
I ...
0
votes
0
answers
49
views
Test Coverage Report including foreign namespace MSTest.Analyzers
I am currently loosing it about the attempt to generate test coverage reports for a current Corpo project. This worked flawlessly quite some time and is now running wild.
The tests are done using ...
0
votes
0
answers
42
views
How to generate an OpenCover report for part of an application?
My Application starts with frmmain
Public Class frmmain
Private Sub frmmain_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Call load_interface() ' Fetch backend data, prepare ...
0
votes
0
answers
58
views
Apache Camel Route Coverage report shows an unrealistically high number of routes
I am using Apache Camel 4.10.6 with the route coverage plugin enabled.
When I run the report, the overall summary looks like this:
[INFO] Overall coverage summary:
Coverage: 54 out of 1509950778 (0.0%...
1
vote
1
answer
94
views
How to isolate code coverage to specific interactions, excluding Spring Boot startup, in IntelliJ Ultimate?
I want to use IntelliJ IDEA Ultimate's "Run with Coverage" on a Spring Boot app to see which lines are executed during manual testing (e.g., hitting an endpoint with Postman).
My goal is to ...
0
votes
1
answer
68
views
Not all files have gcno with bazel --coverage
NB
I have the custom targets which run by python scripts. So I couldn't use bazel coverage directly for this one.
1.
I defined in .bazelrc
build:coverage --collect_code_coverage
build:coverage --...
0
votes
0
answers
51
views
Codecov failing, and I don't understand why (and how fix this)
I have added a CI using Codecov to ensure that code is sufficiently covered when PR are done in my code.
But the job is still failing after the modifications I made.
Here is the full report from ...
0
votes
0
answers
26
views
NX E2E testing not generating coverage
Our project structure looks like this:
apps
|
---api
---api-e2e
with the e2e using @nx/jest for testing.
I'm trying to generate the coverage for API, but haven't been able to do it successfully.
I ...
1
vote
1
answer
67
views
Configure code coverage to be more forgiving with null conditional operator
In a C# project (using Visual Studio or VS Code, and Azure Devops), if I have a line like this:
var result = variable.Property.InnerProperty.InnerMostProperty.FinalValue.ToString();
I have a unit ...
0
votes
0
answers
52
views
How to remove method or line from sonarqube check in Go?
have a correct method to remove unique method or line from check coverage sonar? like //NOSONAR?
I've tried but I wouldn't like to have to use sonar.exclusions= in my sonar-project.properties file
0
votes
0
answers
61
views
How to Measure Test Coverage for WSO2 Micro Integrator XML-based Artifacts?
I’ve recently moved from a Java/Spring Boot stack where I used tools like JaCoCo for code coverage to working with WSO2 Micro Integrator, where most of the integration logic is defined in XML-based ...
1
vote
0
answers
40
views
publish coverage from tests in docker container with PublishCodeCoverageResults@2
I have an Azure YML pipeline that runs the tests inside a docker container and produces test and coverage results. However if I try to publish the code coverage it succeeds only party because the ...
1
vote
0
answers
98
views
Getting code coverage for only the binaries executed
I'm generating code coverage for a C++ project.
My project has multiple binaries in it. When I'm running unit tests, it generates the gcda files and I generate code coverage based on the respective ...
2
votes
1
answer
431
views
How to include coverage info in VSCode Testing for CMake C++ (GCC) project?
I am trying to get the "Run Tests with Coverage" button working as expected for a C++ project based on CMake. When I hit it, the tests are executed properly, but then it shows the info that ...
0
votes
0
answers
43
views
How to send aggregated jacoco coverage report to coveralls?
I am generating an aggregated jacococ coverage report in a Maven module project like below
<build>
<plugins>
<plugin>
<groupId>org.jacoco<...
0
votes
1
answer
96
views
Setting up Coverity Check for Arduino Codebase
We have a repository that we build using Arduino IDE and we're trying to setup Coverity Checks for it. I tried using arduino-cli for cov-build but it gives the error "No files were emitted". ...
0
votes
1
answer
57
views
How do I selectively hide no-data-collected when using coverage.py?
I have a test suite that runs a bunch of system tests on an API. Some system tests interact with the API by using Flask's test_client, whereas a few specific tests interact with the API by making HTTP ...
0
votes
1
answer
83
views
Python code coverage not working for multiprocessing inside site-packages
I have a simple code packages in a module/folder "src"
File sample.py
import multiprocessing
def f(x):
return x*x
def big_run(n):
with multiprocessing.Pool(5) as p:
p.map(f,...
1
vote
2
answers
49
views
How to combine unittest with trace module to produce coverage like report?
I know how to use coverage module to get "human readable" coverage output (using popular third party coverage module). This can be used with pytest or unittest (with some differences in the ...
0
votes
0
answers
332
views
How do I convince the CMake Tools extension for VSCode to actually "Run Tests With Coverage"
I am using Visual Studio Code, with the CMake Tools extension from Microsoft (https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools)
In the left bar, there is an icon shaped like ...
0
votes
1
answer
74
views
GCOV coverage does not work when process is created using fork and execv?
I have a large application which forks and execv another binary.
I have compiled both parent application and forked child application using --coverage flags.
Noticed that .gcno files are created for ...
0
votes
0
answers
31
views
NYC is complaining about missing TS files
I am using nyc, mocha, and Nodejs (TS) as my tech stack.
I run my Nyc command on precompiled code, i.e., only JS and JS map files are present in the build.
When I run my test command Nyc code coverage ...
0
votes
2
answers
479
views
How do I merge code coverage information from different tests and coverage files
I have a scenario where
I have multiple tests (for the same source code) that are run in parallel
The code coverage report is generated and stored in separate folders per test
End of the day, I need ...
2
votes
2
answers
121
views
Enable Code Coverage diff without a target/gate threshold in ADO
I have code coverage enabled and published in my ADO pull request pipeline. I'm looking at adding code coverage diff to it.
The Microsoft Learn Document doesn't mention how to fail a build if the ...
0
votes
0
answers
23
views
Generate coverage with nyc, without made test
I have a webserver made with Express.js and I want check the coverage of some request made with Postman, but nyc don't show any line as reached by the requests.
I have made a small reprocucible ...
0
votes
0
answers
105
views
LCOV reporting branch coverage for non-branch lines in VHDL code - bug or expected behavior?
I'm working with GHDL (GHDL - v6.0.0-dev - Ubuntu 24.04 (x86-64, LTS) - gcc backend) and LCOV to analyze code coverage for VHDL projects, but I'm encountering unexpected behavior in the branch ...
0
votes
1
answer
59
views
Differential Code Coverage in Azure DevOps (ADO) for logical monorepo
I'm working on a project, where I have a pull request pipeline for a logical monorepo.
For this I'm using the git submodule functionality to pull a few repositories into mine, and building them.
I use ...
-1
votes
3
answers
1k
views
How to merge lcov.info files to make a consolidated coverage report?
I have two projects (actually, a project and its sidecar) in the same repository - the server (root) and aux/sidecar (at aux/sidecar folder). I generate coverage for them using jest --coverage calls, ...
0
votes
1
answer
107
views
How to add ignore_bins for coverpoint which is defined in base class
How should I add ignore_bin in child class for a coverpoint which is defiened in base class?
I tried extending base covergroup but it shows compilation errors for keyword extend in this context ...
1
vote
1
answer
531
views
SonarQube shows 0% coverage with .NET project using GitLab CI/CD Windows runner and Linux container
I'm trying to analyze code coverage in SonarQube for a .NET project using GitLab CI/CD. My setup is:
Windows runner for tests
Linux container for SonarQube analysis
ReportGenerator for coverage ...
0
votes
0
answers
59
views
Jacoco Report missing while executing mvn clean install command
I'm trying to create a jacoco report on our project The project is in java 17 version and the jacoco-maven-plugin is on version 0.8.8.In the target folder the jacoco.exec file gets created. But the ...
0
votes
0
answers
11
views
Command line coverity subcompent
It's possible to create via command line Coverity subcomponents, add a regex to them and assign them to a stream?
0
votes
1
answer
254
views
Bitbucket server pull request code coverage integration, without third-party plugin
In the bitbucket server doc (https://confluence.atlassian.com/bitbucketserver/enhancements-to-your-code-review-workflow-1014275076.html), I see this note:
We've got your code covered (released 7.0)
...
0
votes
1
answer
837
views
Fine Code Coverage(FCC) throwing issue while generating the report
In the latest version of VS 17.13.2, FCC is breaking with the below error
System.InvalidOperationException: Failed to load RunSettings file: 'C:\Users\xyz\src\Services.UnitTests\bin\Debug\net8.0\fine-...
0
votes
0
answers
529
views
Jacoco Report Showing 0% Coverage Despite All Tests Passing - How to Ensure Minimum 60% Coverage?
I'm working on a Java project using Maven, and I've been trying to generate a Jacoco code coverage report. However, even though all of my test cases are passing successfully, the generated Jacoco ...
3
votes
0
answers
201
views
SonarQube code coverage - exclude code not files
I have an Android project that uses Kover to measure code coverage. These results are then sent to SonarQube. This all works fine except that I want some code to be excluded from code coverage.
This ...
2
votes
1
answer
166
views
Export the Disassembly file(s) from Keil uVision 5
When I'm debugging in uVision 5 the Disassembly window shows the interleaved source code and assembly instructions and the index of the current executed instruction. I need this window exported in a ...
1
vote
0
answers
101
views
Bazel coverage with cache
I have been testing coverage collection with Bazel and wanted to share my findings in response to a point noted in the Bazel documentation on coverage.
Documentation Claim:
The documentation mentions:
...
1
vote
1
answer
796
views
How to setup Kover for multi module project with Android & Kotlin modules
I have multi module project with both Android & Kotlin modules.
To simplify I have the following modules:
:data is an Android module. This just has the variants debug and release.
:domain is a ...
1
vote
0
answers
50
views
AEM as a Cloud Service - SonarQube REACT Code Coverage
Context
We are implementing a hybrid implementation with AEM + REACT using AEM as a Cloud Service. We are having our REACT code coverage in *.tsx files under ui.frontend module.
We have configured &...
2
votes
2
answers
153
views
1 of 6 branches missing issue using Jacoco
I am stuck in a situation where I am not able to fix the 1 of 6 branches issue. Below is the small code I tried to produce
package org.example;
public class Testing {
public static final String ...
0
votes
0
answers
208
views
Extract total coverage from JaCoCo report
How can we extract the total coverage from JaCoCo? I just need that number to use it for external reporting. I see the coverage total in the Jacoco report (HTML), but do not see it in the jacoco.xml.
...
0
votes
0
answers
67
views
IntelliJ coverage report is inconsistent
I've been having a very strange problem with IntelliJ's code coverage report, which I haven't been able to find mentioned anywhere else. For a few of the classes in one package, if I run the ...