Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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.

0
votes
0answers
8 views

CircleCI Code Climate Coverage Failing

My project is on github if you need more details. .circleci/config.yml: https://github.com/developer239/localized-graphql-koa-typescript/blob/master/.circleci/config.yml I feel like this has ...
7
votes
3answers
2k views

Xcode 7 code coverage - No Coverage Data

I have ticked "Gather coverage data" and run the unit test, however Xcode shows "No Coverage Dat". All Unit test are passed. Xcode 7 is used
3
votes
0answers
144 views

How can i verify my code coverage with vscode running Xunit and C#

I wonder if there are extensions available for adding code coverage with C# in Visual Studio Code in Linux... I have already searched the extensions but I'm not able to find some. Kind regards
0
votes
0answers
14 views

VSTS - how to get Code Coverage results

I'm new to DevOps work and I've been tasked to setup a build for one of our .net Standard Library projects. I used the build template for this, which works great! But I want to add a code coverage ...
0
votes
1answer
27 views

VSTest.console.exe when run under Jenkins generate empty .coverage file

I have a simple build configuration with Jenkins for a .Net Framework project. The project uses Unit Tests. When I run the tests using VSTestRunner plugin under Jenkins, it generates test report .trx ...
1
vote
2answers
159 views

Why doesn't Sonar read the format of django-nose coverage results?

When I try to send a python project with sonar-scanner, it throws an exception: Caused by: java.lang.IllegalStateException: Unknown report version: 4.4.2. This parser only handles version 1.". ...
0
votes
0answers
14 views

vue coverage summary alway 100%(0/0) use webpack4 + karma + mocha

I want vue unit test, coverage summary alway 100%(0/0) when use webpack4 + karma + mocha, but use webpack3 is currect. wrong result package.json: vue-loader@15 webpack@4 currect result package....
5
votes
1answer
505 views

Code coverage for laravel dusk

Is there any way to get code coverage when running Laravel Dusk? I know it runs browser tests so it's not scrutinizing code, but is there a way to add a listener to check what code is covered? I did ...
0
votes
0answers
13 views

Issues in generating Code Coverage Reports if artifacts and source files are in different directories

I am working on generating the C++ Code Coverage and integrating it with SonarQube-Jenkins. It works well when I keep .cpp, .o, .gcno, .gcda, etc in same directory. But I am getting issues when src ...
0
votes
0answers
16 views

Java Code Coverage in Visual Studio Code

I am using VSC for my Java project with maven help. I would like to use a Code Coverage tool but I lost the directions in the many possibilities you have. My goals are: run the Code Coverage goal ...
6
votes
0answers
123 views

Async methods which are marked as “ExcludeFromCodeCoverage” still shown as not covered in Sonarqube

I have a Windows service which has few async methods in it. I'm writing unit test cases for all these methods. For one async method, I do not want to write any test cases, so I have decorated that ...
0
votes
0answers
13 views

how to see code coverage in visual studio 2017

I have a solution and I am unable to see the code coverage. What am I doing wrong? I tried to follow the instructions in the Microsoft help document Using Code Coverage to Determine How Much Code is ...
0
votes
2answers
26 views

How to enhance C.R.A.P. index for a switch-like function?

I have a very typical switch-like function that returns a clasiffication for a given input value (Body Mass Index in this case). (I'm working with this function, but it could be any other of the same ...
60
votes
9answers
30k views

How to measure code coverage in Golang?

Has anyone succeeded in generating code coverage for Go unit tests? I can't find a tool for that on the web.
2
votes
2answers
8k views

Run gcov tool using c++ compiler

I am working, for the first time, with the coverage tool gcov to analyze a large project. I have a directories structure like this: HW -FooHW1.cpp -FooHW1.h -FooHW2.cpp -...
88
votes
7answers
27k views

Free NCrunch alternative [closed]

Since NCrunch has left the free market, I was looking for a similar tool for code coverage marking, and continous testing like NCrunch edit: I'm using VS2012 update: I've been using ContinuousTest ...
2
votes
1answer
51 views

Python custom module not found but already exists

I have created a separate file to hold some custom issue classes for my Python file and upon execution of the following command: coverage run test_syntax.py it prints out the following error as seen ...
0
votes
0answers
11 views

How to see a friendly report of unit tests using .Net Core and coverlet?

I'm using coverlet and .Net Core to develop an API, I started to make unit tests (the only tool I've found for .Net Core was coverlet). I got the coverage, but I only can get files like json, xml etc....
0
votes
0answers
15 views

Set up code coverage with CherryPy?

I can see from the documentation that there is a module named covercp. It says to "simply" put the line: cherrypy.engine.subscribe('start', covercp.start) but when I do that it tells me that ...
0
votes
1answer
10 views

On codecov, what does it mean when a line is not colored?

On the ethereum/solidity project they recently enabled code coverage reporting, and the report is being sent to codecov. I'm reviewing it and I found this weird thing: Here in line 45 of the ...
6
votes
2answers
3k views

Sonar-Overall Coverage

Sonar gives a value of Overall coverage which is a combination of line and branch coverage. I am not sure how important is this metric. What does the value of overall coverage signifies? How it is ...
15
votes
2answers
682 views

How to setup Codeception with remote code coverage?

I have two repo on my machine API Codeception repo that tests API In API repo I have added codeception+c3 "require-dev": { "codeception/codeception": "2.*", "codeception/c3": "2.*", I've ...
0
votes
0answers
20 views

How to use bullseye to generate code coverage report from cmdline

I have written a module in C++ which generates a .lib file. I have written a C++ console application which uses BOOST TEST framework for unit testing to test the above .lib file. I am new to ...
0
votes
0answers
24 views

Angular 6 Code Coverage… how to exclude local library in code coverage of application?

I have an Angular workspace with the following basic structure: /projects -- /admin <-- angular application -- /core <-- library These were generated by running ng generate application ...
6
votes
3answers
637 views

Xcode 9.4 : Error generating code coverage

I'm running all test cases of project (cmd + U) then all of sudden this error message pops-up with no reason. I'm using Xcode 9.4. Any fix?
3
votes
1answer
4k views

Boost C++ Unit Testing Code Coverage TeamCity

Please excuse what may appear to be a novice question. I have searched on the net for awhile without results. Is it possible to get code coverage on TeamCity using the Boost C++ Unit testing ...
1
vote
1answer
31 views

How to add package to dotnet for WPF app?

I am trying to add a package to dotnet using a command: dotnet add package JetBrains.dotCover.CommandLineTools --version 2018.2.0-eap07 However, I am getting an error: The project does not support ...
0
votes
1answer
270 views

Jacoco Show Source Code

I have some code which reads the exec file and creates html pages for all of my projects running on a webspehre server. The server is on a remote machine, I have all the source code running on the ...
3
votes
3answers
715 views

Is there a code coverage tool that works with manual testing?

In php, is there a tool that can generate a code coverage report without using automated unit test cases ? (basically not using phpunit or similar unit testing frameworks which do a good job ...
1
vote
1answer
74 views

JS Code coverage

I am a newbie for the testing scenario. I have one question wanna ask your help. For example, if I have one web application which implemented from HTML, JS and CSS and calls other APIs. While this ...
0
votes
0answers
21 views

How can i create code coverage report for manual testing for javascript client side?

We need to generate code coverage report without unit test case (Manual testing in browser). With karma configuration need to generate the code coverage report. Combination of istanbul, karma and ...
-2
votes
1answer
62 views

MEASURING MANUAL/AUTOMATED FUNCTIONAL TESTS CODE COVERAGE

We are trying to generate code coverage on performing manual tests for application hosted in Azure app services. I have a trail account in portal.azure.com with 'user' privilege. Tried the below ...
1
vote
1answer
47 views

Code coverage for service class method

I'm trying to do the code coverage for a method of service class with mockito. I'm new with mockito and tried to mock the call to service method but the code coverage is 0. I'm not sure if I can mock ...
0
votes
0answers
19 views

Jenkins Jacoco Plugin Coverage Threshold

The Jacoco plugin allows you to set a minimum coverage and a maximum coverage for each metric. I am unclear on what the difference between these numbers are though, specifically regarding line ...
0
votes
0answers
15 views

IntelliJ *.class files code coverage

I have Java class files in my TEST project, and the java sources of that class files in other project. Now I wrote some tests for my class files, but as they are of type class, IntelliJ does not ...
0
votes
0answers
13 views

Jacoco does not compute coverage for child module

Consider a multi-module maven project Parent pom.xml common src->main->java->a -> b SomeUtil.java pom.xml service src->main->test->p-&...
1
vote
0answers
35 views

Gcov Coverage: Can we do coverage for just a few lines of code in a File.

I need to generate a report with coverage for just the new lines of code added with in each sprint. Other than using comments is there a way to do that using the gcov/lcov tool.
7
votes
2answers
2k views

How to get combined code coverage over multiple runs of Python script

I've got a python program which is tested by running it several times with different inputs, and comparing the outputs against reference results. I'd like to get code coverage of all the tests ...
0
votes
0answers
8 views

JS Run Code Coverage for Particular Commit

I've always used Istanbul to run code coverage as part of our CI builds. What I would like to do, though, is run specific code coverage on a commit. i.e. if a commit had 100 lines of code added, but ...
16
votes
3answers
2k views

Xcode9 code coverage is not displayed

I have been trying to get the code coverage for my project using Xcode 9. All test case run successfully but did not generate the code coverage report under Code coverage tab. I tried following ...
0
votes
0answers
16 views

Is there a software for plotting trending code coverage data from Karma/Jasmine

I have an Angular app along with the standard Karma/Jasmine set up for unit testing. What I want is to feed the code coverage reports I get for each nightly build into a software that would create a ...
0
votes
0answers
42 views

Mockery fails with 'Could not load mock … class already exists' when running with --code-coverage

I am trying to mock a class for phpunit. Php unit fails with the error Could not load mock ... class already exists. This is the only test I'm running, so it can't be the case that the class is mocked ...
1
vote
2answers
178 views

if-else path not taken in imports in angular istanbul code coverage report

import { Component, OnInit } from '@angular/core'; import { Title } from '@angular/platform-browser'; @Com(I)ponent({ selector: 'app-fruit-cake',(E) templateUrl: './fruit-cake.component.html', ...
0
votes
1answer
26 views

How to get coverage for multiple files in GOLANG

I have a package in GO-LANG that has several files implementing it. (all files are in the same directory) file1: mypackage.go package mypackage func f1 () {} file2: mypackage_addition.go package ...
2
votes
2answers
892 views

How do I make PyCharm show code coverage of programs that use multiple processes?

Let's say I create this simple module and call it MyModule.py: import threading import multiprocessing import time def workerThreaded(): print 'thread working...' time.sleep(2) print '...
7
votes
1answer
8k views

IntelliJ show changed lines not covered by unit tests

In my daily work, I intend to write tests for the code that I change. My workflow usually is like this: Find code to change Write failing test Change code Watch test pass And before commit, I run ...
0
votes
0answers
15 views

Setting codecov patch target to a fixed number

codecov allows you to specify a total coverage target and it also allows codecov/patch. The patch check however attempts to enforce that the patch coverage is atleast at current master's coverage. i.e....
0
votes
0answers
10 views

How can I get to know which test runs particular code line?

If I run test with coverage in IDEA I can see which code line covered by tests or not. How can I got to know by what test this code line is covered? (I just change some logic in big and ...
3
votes
1answer
188 views

Chrome Dev Tools - Code Coverage during navigation

The new code coverage feature is really awesome, but it can only test one page. Obviously noone has a site where you can see all abstractions and modules at once. This might be the case on SPAs, ...
2
votes
1answer
255 views

Chrome Developer Tools : I CSS Coverage unused bytes

I am trying to remove unused CSS from a webpage. In Chrome Developer Tools -> click on vertical three dots -> More tools -> Coverage. Click on any CSS We see a report wherein red indicates unused ...