code-coverage

Code coverage with GCOV can't produce .gcda file

主宰稳场 提交于 2019-12-22 18:45:31
问题 I want to get code coverage with GCOV, I set build setting by http://developer.apple.com/library/mac/#qa/qa2007/qa1514.html add "-lgcov" to "Other Linker Flags" check "Instrument Program Flow" check "Generate Test Coverage Files" but I can't produce the .gcda file, could anyone help? 回答1: The simulator has to close before the gcda files get generated. So, when I run GHUnit I have to close this app first. There's also a setting in the plist to kill the app when it closes, rather than have it

What's the point of basis path coverage?

无人久伴 提交于 2019-12-22 12:54:58
问题 The article at onjava seems to imply that basis path coverage is a sufficient substitute for full path coverage, due to some linear-independence/cyclomatic-complexity magic. Using an example similar to the article: public int returnInput(int x, boolean one, boolean two) { int y = x; if(one) { y = x-1; } if(two) { x = y; } return x; } with the basis set {FF,TF,FT}, the bug is not exposed. Only the untested TT path would expose it. So, how is basis path coverage useful? It doesn't seem much

What's the point of basis path coverage?

喜夏-厌秋 提交于 2019-12-22 12:53:11
问题 The article at onjava seems to imply that basis path coverage is a sufficient substitute for full path coverage, due to some linear-independence/cyclomatic-complexity magic. Using an example similar to the article: public int returnInput(int x, boolean one, boolean two) { int y = x; if(one) { y = x-1; } if(two) { x = y; } return x; } with the basis set {FF,TF,FT}, the bug is not exposed. Only the untested TT path would expose it. So, how is basis path coverage useful? It doesn't seem much

How can I disable code coverage / assembly instrumentation in Visual Studio 2012?

只愿长相守 提交于 2019-12-22 12:18:28
问题 I have a project upgraded from Visual Studio 2010 to 2012 and the .testrunconfig file was included in the upgrade process. I noticed that it was possible to click "Analyze code coverage" on any of the unit tests that I had run and it would correctly display the result. However, my test run configuration (originally from VS 2010) had code coverage disabled. After doing a bit of research I learned that the VS 2010 configuration files have been deprecated and replaced by .runsettings files. It

How to use nose coverage with --timid flag

浪尽此生 提交于 2019-12-22 10:56:19
问题 I'd like to run "nosetests --with-coverage" using Ned Batchelder's coverage module, but passing the coverage module the --timid flag. Is there a way (e.g. setting an environment variable) to make coverage run with --timid? 回答1: You've got two options: Use a .coveragerc file to provide options to coverage.py Instead of running coverage inside nose, run nose inside coverage: coverage run c:\python25\scripts\nosetests-script.py (sorry for the Windows syntax if you aren't on Windows) 来源: https:/

How do I generate coverage xml report for a single package?

断了今生、忘了曾经 提交于 2019-12-22 10:54:45
问题 I'm using nose and coverage to generate coverage reports. I only have one package right now, ae , so I specify to only cover that: nosetests -w tests/unit --with-xunit --with-coverage --cover-package=ae And here are the results, which look good: Name Stmts Exec Cover Missing ---------------------------------------------- ae 1 1 100% ae.util 253 224 88% 39, 63-65, 284, 287, 362, 406 ---------------------------------------------- TOTAL 263 234 88% -----------------------------------------------

sphinx, buildbot (and code coverage). how do they integrate?

☆樱花仙子☆ 提交于 2019-12-22 10:47:23
问题 I have a not-so-small python package, with quite some history, documented with docstrings. During its development we introduced buildbot and later on Jenkins/Hudson. Recently I added a sphinx recipe to my buildbot.cfg , in order to collect the documentation from the sources and keep up to date web accessible docs. so far, so good: each time I commit a change, Jenkins takes care of extensively checking the package, generating a very complete overview and updating our documentation site. one of

Why does Cobertura report 0% coverage when run through the Eclipse plugin?

狂风中的少年 提交于 2019-12-22 08:43:57
问题 (There are a tonne of these questions, but all the ones I can find relate to Maven. Before you suggest this one is a duplicate, please understand that this doesn't relate to Maven in any way.) I am using Cobertura within Eclipse to determine my percentage of code covered by my JUnit tests. All 99 of my unit tests run successfully, both within and outside of Cobertura, but Cobertura reports back that they have covered 0% of my code. I : am running Cobertura through the Eclipse plugin am using

Android JUnit: Define a different Application subclass

。_饼干妹妹 提交于 2019-12-22 07:01:16
问题 So for my normal Android project, I have the following in AndroidManifest.xml: <application android:name=".utilities.App" ...> .... </application> And then I have my App class: public class App extends Application { .... } And then I have an Android JUnit Test project associated with the Android project. Everything is all fine and dandy and I can write JUnit tests. However, I'm trying to run code coverage with my JUnit tests and I'm getting bloated results. The reason is because my App class

Partial EMMA code coverage in Scala Case Class for IntelliJ IDEA 10.5

不羁岁月 提交于 2019-12-22 05:40:43
问题 I'm using IntelliJ IDEA 10.5 with the Scala plugin v0.4.1338 updated on August 14th, and Scala 2.9.0.1. I recently began using the EMMA test coverage utility in IDEA to generate coverage reports. I cannot determine why the constructor line of my Scala case class is only showing partial (yellow) coverage. I have looked in the EMMA FAQs and researched the matter online with no success. Does anyone have any idea how I can reach 100% coverage on a case class? 回答1: case class A(a: Any) generate a