code-coverage

What is required to generate code coverage data using XCode 4

[亡魂溺海] 提交于 2020-01-11 09:18:07
问题 I have been trying to generate code coverage data for my application on XCode 4.2.1 (build 4D502) using the steps outlined at http://code.google.com/p/coverstory/wiki/UsingCoverstory I am obviously missing something as there are no .gcno or .gcda files being generated along side my object files. I've tried adding the settings to both my test target and my application target but to no avail. I've had a second set of eyes go over things and all appears to be in order. Any ideas as to what is

C# Code Coverage metrics

左心房为你撑大大i 提交于 2020-01-11 09:17:45
问题 Is there a free commercially available code coverage tool (down to invidual LOC level) available? I am aware of VS2008 Team Edition, but unfortunatly do not have the budget to perchase a license! So Im looking for a free (as in beer) alternative. Any Ideas? 回答1: NCover is an open source code coverage tool for .NET. It appears that newer commercial versions are available too at NCover.com. Also see this previous question: Code Coverage for C#/.net 来源: https://stackoverflow.com/questions/556399

android jacoco coverage empty with gradle

喜欢而已 提交于 2020-01-11 05:17:06
问题 I'm trying to make jacoco create a code coverage report for my android test project. I have the following in build.gradle: apply plugin: 'com.android.application' apply plugin: 'jacoco' ... jacoco { toolVersion = "0.7.1.201405082137" } ... android { buildTypes { release { } debug { testCoverageEnabled true } } } when I run gradlew -i createDebugCoverageReport, I get a coverage report, but it's empty. the end of the gradle execution is as follows: :androidTest:connectedAndroidTest (Thread[main

How to get all packages' code coverage together in Go?

。_饼干妹妹 提交于 2020-01-10 17:59:43
问题 I have a library consisting of several packages. When running tests, I am using '-cover' flag and its showing the coverage information for each package individually.Like follows: --- PASS: TestSampleTestSuite (0.00s) PASS coverage: 28.7% of statements ok github.com/path/to/package1 13.021s ? github.com/path/to/package2 [no test files] === RUN TestAbc --- PASS: TestAbc (0.43s) PASS coverage: 27.7% of statements Is there any way to get a full coverage overview easily to get good idea about

Exclude Files/Lines of code in Xcode 7 Code Coverage

ⅰ亾dé卋堺 提交于 2020-01-10 08:39:15
问题 How would you exclude a few methods, or say the AppDelegate file, from being tested during Code Coverage in Xcode 7? I am not using Gcov. 回答1: Xcode coverage is generated by target (you can enabled it per scheme). Something I often do is separate all my testable code into a separate DynamicFramework from all my UI code. I can generate coverage just for that one framework if i like. Alternatively you could look at some of the 3rd party coverage parsing tools such as: xcov slather Each tool

Where does Sonarqube collects data from?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-07 03:07:20
问题 Last day I was configuring a jenkins job to run sonar on my java project. I had sonar and jacoco plugins configured in my job. Sonar was throwing some error for which my sysadmin asked me to remove the jacoco plugin configuration from job. I removed and now sonar is saying it cannot find cobertura.xml. So I am curious to know if sonar does analysis on already run jacoco or cobertura task or does it runs its own coverage analysis? 回答1: Short answer : In general, coverage is imported to

Code coverage warrnings spam output

风格不统一 提交于 2020-01-07 02:37:29
问题 In CMake tests configuration I added flags to generate codecoverage IF( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage") SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage ") endif() Each time I run tests - my output is spammed with those messages: profiling: /xxxx/xxxxxj/projects/build-xxxxx-CLang-Debug/tests/CMakeFiles/xxxxxxxxxxxxxt_ut.dir/tests/gui/ship_design/ut

Error when generating code coverage report for androidTest instrumented testcases with dagger

狂风中的少年 提交于 2020-01-06 17:58:25
问题 I want to run createDebugCoverageReport gradle task.But after run task is failing and giving below error. java.lang.NoClassDefFoundError: dagger.shaded.auto.common.BasicAnnotationProcessor at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:324) at android.support.test.internal.runner.TestLoader.doLoadClass(TestLoader.java:92) at android.support.test.internal.runner.TestLoader.loadIfTest(TestLoader.java:113) at android.support.test.internal.runner

Error when generating code coverage report for androidTest instrumented testcases with dagger

假装没事ソ 提交于 2020-01-06 17:58:04
问题 I want to run createDebugCoverageReport gradle task.But after run task is failing and giving below error. java.lang.NoClassDefFoundError: dagger.shaded.auto.common.BasicAnnotationProcessor at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:324) at android.support.test.internal.runner.TestLoader.doLoadClass(TestLoader.java:92) at android.support.test.internal.runner.TestLoader.loadIfTest(TestLoader.java:113) at android.support.test.internal.runner

Why don't I get code coverage results for C++/CLI project in Visual Studio 2010?

我与影子孤独终老i 提交于 2020-01-06 16:22:20
问题 I've recently upgrade my solution to Visual Studio 2010. I have 4 projects I want to cover using unit tests - 3 C# and 1 C++/CLI. I get coverage for the C# projects but not for the C++/CLI project. I did get for all of them in Visual Studio 2008. I've configured the assemblies using testrunconfig -> Data and Diagnostics -> Code Coverage -> Configure. Why don't I get code coverage result for the C++/CLI project? 回答1: I've found out what was wrong. It appears that the upgrade from Visual Studio