code-coverage Questions

12

Solved

How do I find what code is and isn't being run in production ? The app is well-tested, but there's a lot of tests that test unused code. Hence they get coverage when running tests... I'd like to ...
Dardan asked 16/3, 2012 at 10:11

1

Introduction I have written a Swift Package and would like to integrate Codecov as a part of my CI (set up with Github Actions). Here is my .yml file: name: Swift on: push: branches: [ "m...

3

I recently started working with C# and I am working on one of the legacy system we have. I am trying to figure out what is the code coverage for this legacy system. Here is my Sample.UnitTests.cspr...
Sigfried asked 31/5, 2020 at 17:52

3

I am trying to collect my code coverage for my .net core 6 project, I have written some tests and I am planning to upload the results to sonarqube. I read this documentation and decided to go with ...
Resistive asked 9/8, 2022 at 23:6

11

Do you have any examples of real life applications of mutation testing? Does it work better than simple test coverage tools? Or is it useless? What are the advantages/disadvantages of mutation tes...
Routinize asked 28/10, 2008 at 9:29

3

Solved

I need help to find code coverage. I have just created a new app using the latest create-react-app. I am trying to find the code coverage using npm run test -- --coverage. this is showing empty cod...
Jahdiel asked 15/7, 2019 at 6:12

9

Solved

I am using Python coverage to test my apps. Looking at other developers on GitHub I see they have a small badge which shows the percentage of coverage. Using coverage, how can I generate these badg...
Alleman asked 27/3, 2015 at 8:10

3

Solved

I am new to python, I have written test cases for my class , I am using python -m pytest --cov=azuread_api to get code coverage. I am getting coverage on the console as How do I get which line...
Roshan asked 16/2, 2018 at 10:59

5

Solved

Statement coverage is said to make sure that every statement in the code is executed at least once. Decision/branch coverage is said to test that each branch/output of a decisions is tested, i.e. a...
Drusi asked 25/1, 2013 at 10:0

2

Solved

I'm trying to add test coverage reporting to an Android app project. The app is written in Kotlin and build with Gradle (Groovy variant) into 5 flavors. The following Gradle plugins are used: plugi...
Killie asked 28/2, 2023 at 11:44

2

I'm using IntelliJ 2017.3 to measure the code coverage of my tests. The code base contains some more or less dumb classes that should be excluded from this measurement. I want to exclude all classe...
Dairen asked 18/12, 2017 at 10:17

3

Solved

I want to show test coverage for my .NET 5 unit tests in my local SonarQube instance (on Windows). dotnet sonarscanner begin /k:"MyProject" /d:sonar.host.url="http://localhost:9000&q...
Bellyband asked 14/4, 2021 at 7:4

2

Solved

Given the code: public void foo(int age,boolean smart) { if (age>18 && smart) { // <--- This is the part that should be covered doSomething() } } Using JUnit I test foo(15,true)...
Willenewillet asked 10/2, 2015 at 8:34

2

I have a .Net solution with two dotnet core class libraries and its associated unit test projects in it. When I run dotnet test **\*.Tests.csproj --collect "Code Coverage" command then it generate...
Gelasias asked 23/4, 2019 at 12:58

3

Solved

I'm just building a test suite for a legacy Rails app. The simplecov gem has been great for finding dark corners of the app which need test coverage (or which may be completely unused and OK to rem...
Duff asked 23/10, 2012 at 12:56

4

Solved

I have 20 projects in my .SLN file. I am running my unit tests through the Test Explorer and generating the code coverage. Only eight of the projects show up in the coverage (see screenshots). I am...
Companionway asked 20/2, 2013 at 21:47

2

I'm running tests in multiple projects of my nx angular monorepo and would like to get a single code coverage report of all projects with all code files covert from the tests. The test-runs seems t...
Secateurs asked 26/3, 2022 at 12:26

10

Solved

I am developing apps using Android Studio. I was able to run the test code. But, I do not know how to get code coverage in android studio. I have already seen the following links. Android Gradle C...
Airt asked 8/9, 2013 at 11:14

3

The unit test coverage report from Istanbul in HTML format displays every single folder of the project in the index.html. It actually flattens the directory structure. Is there an option to render...
Shroudlaid asked 13/8, 2014 at 16:1

1

I'm struggling to set up coverage correctly using Playwright. It reports 0 coverage in all files (except the test files themselves, if I include them). I'm getting inspiration from https://playwrig...
Imperil asked 15/2, 2022 at 14:35

3

I have a sonar-project.properties file, which specifies how sonar-runner inspects the the folder structure, which files to inspect, which files to ignore etc. I cannot successfully determine howev...
Amphistylar asked 10/6, 2015 at 10:7

11

Solved

I'm working on a Flutter app using Android Studio as my IDE. I'm attempting to write tests and check the code coverage but I can't work out how to view the data in the IDE or any other application....
Subcommittee asked 11/6, 2018 at 1:46

3

Solved

Currently I have this line in my .gitlab-ci.yml file: if (( $coverage < $MIN_COVERAGE )) ; then echo "$coverage% of code coverage below threshold of $MIN_COVERAGE%" && exit 1 ;...
Niel asked 11/5, 2022 at 21:10

1

When we run Jacoco code coverage of Jetpack Compose function, I like to exclude all Preview functions. I can do so using @Retention(AnnotationRetention.RUNTIME) @Target(AnnotationTarget.FUNCTION) i...

12

I generated a code coverage report from jacoco, which is jacoco.exec. But I don't know how to use it ... The way I generated it is through command line: java -javaagent:/path/to/jacocoagent.jar=i...
Exception asked 31/7, 2013 at 14:23

© 2022 - 2024 — McMap. All rights reserved.