Questions tagged [code-coverage]
"Code coverage" (synonym: test coverage) is a measure of the amount of application source code that has been exercised, usually by some testing regime, often by unit testing.
code-coverage
5,386
questions
0
votes
0
answers
9
views
Jenkins Coverage Plugin isn't publishing to GitHub
I have a .net test which generates a coverage report for my project, and it publishes the coverage report with Jenkins using the Coverage plugin (https://plugins.jenkins.io/coverage/).
However this ...
0
votes
1
answer
17
views
How to get unit test code coverage of Android kotlin project?
I have a Andorid kotlin project. I want to get the code coverage of the unit test using some script as it needs to be included in CI/CD pipeline.
How can I achieve this?
Thanks.
0
votes
0
answers
9
views
My Apex test class coverage isn't happening because of a condition
I have written the below apex class
public with sharing class BillingMonthlyCustomApp {
public BillingMonthlyCustomApp() {}
public static void insertRecordsIntoSchedule(Set<Id> ...
1
vote
0
answers
19
views
Partial line coverage report with dotnet-coverage
I am working on a C# project and would like to find out which lines are "to cover" with unit tests.
I run the following commands to execute the tests and upload them to sonarqube
dotnet ...
0
votes
0
answers
26
views
Why is SonarQube ignoring coverage data by gcovr from C++ files?
I have a project that is structured like this:
- 3rdParty_Lib1
- 3rdParty_Lib2
- Project_Root
--- apps/
--- include/
------ project_headers/
------ boost_headers/
--- src/
------- module1/
------- ...
0
votes
2
answers
55
views
Why does Fine Code Coverage tell me the portion of tests being run instead of portion of source code being tested?
I am new to unit testing C# in Visual Studio. I want to get the coverage report but I don't have Visual Studio Enterprise so I installed Fine Code Coverage. What I don't understand is it seems like ...
-1
votes
0
answers
14
views
.NET Code coverage SonarCloud github actions yml file
build.yml
`on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: ...
0
votes
0
answers
12
views
Get code coverage report path from SonarQube
We have a giant monolith application. We are using SonarQube for static code coverage. We have an internal requirement to showcase code coverage as per feature level.
We have created a program which ...
2
votes
1
answer
60
views
Generate code coverage for a single test suite
I wish to determine which files are covered by each of my test suites separately. I am using PHPUnit 10.5 with Xdebug for code coverage on my PHP 8.1 project.
Here is what my phpunit.xml configuration ...
-2
votes
0
answers
41
views
Is it possible to have 100% statement coverage but less than 100% branch coverage?
I think it's impossible, because you would need to follow every branch to cover every statement, but I'm entirely not certain..
0
votes
1
answer
71
views
"Code Coverage Results" Missing in Visual Studio
I'm really new to testing, just starting out. I understood there should be a tab "Code Coverage Results" which can be opened from the Test tab, or by right-clicking on a test, but it doesn't ...
0
votes
1
answer
34
views
System Verilog: Biitwise coverage for multibit signal
I'm beginner in System Verilog. I want to implement a coverage such that a user will send a signal - lets call it input_signal[Width-1 :0] Where width is variable. I want to have bitwise toggle ...
1
vote
0
answers
34
views
Code coverage for Attributes with dotCover and C#
We use dotCover (by Jetbrains). We have some custom attributes on properties of models and dotCover shows they are not covered by tests. I tried a number of ways to make tests for them but dotCover ...
0
votes
1
answer
78
views
How to ignore lines of code from coverage in vitest?
I have my unit tests setup with vitest and I am looking for a way to ignore specific lines of code from vitest coverage.
Looking for something similar to /* istanbul ignore next */.
Is there something ...
0
votes
0
answers
53
views
How to address the Compose UI negative impacts on the Code Coverage, even after writing tests for it?
I recently migrated my Android pet project from View to Compose UI and at the begining I was excited about all the @Compose and @Preview functions but righ away noticed a segnificant drop in the repo'...