test-coverage

XCode 5.1 Unit Test Coverage Analysis Fails On Files Using Blocks

杀马特。学长 韩版系。学妹 提交于 2019-11-28 17:04:07
Today I was tasked with adding unit test coverage analysis to our code base. Today is also the day iOS 7.1 is released along with XCode 5.1. From the release notes: The gcov tool for code coverage testing has been reimplemented. The new version uses the llvm-cov tool from the LLVM project. It is functionally equivalent to the old version for all significant features. The location of gcov within Xcode has also moved, use xcrun to invoke it. If you find problems, please file bug reports. For this release, you can still use the old version of gcov from GCC, which is available as gcov-4.2.

Differences between Line and Branch coverage

一笑奈何 提交于 2019-11-28 15:14:43
问题 I use the Cobertura Maven plugin for one of my project. But I have a question about the generated report: What is the difference between line and branch coverage? 回答1: Line coverage measures how many statements you took (a statement is usually a line of code, not including comments, conditionals, etc). Branch coverages checks if you took the true and false branch for each conditional (if, while, for). You'll have twice as many branches as conditionals. Why do you care? Consider the example:

Jacoco Code Coverage in android studio

三世轮回 提交于 2019-11-28 05:24:52
I am trying to generate Jacoco code coverage report. I have used AndroidTestCase for my test classes. I have found using testCoverageEnabled true and using default android -studio default jacoco, ./gradlew connectedCheck or createDebugCoverageReport create the percentage of successfull/fail test cases, but no coverage report. Then I have tried jacoco {toolVersion "0.7.1.201405082137"}, and task jacocoTestReport(type:JacocoReport, dependsOn: "testDebug"). I have tried to change the dependsOn value with various task. The report shows 0 (zero) test coverage, which is impossible because at least

Jacoco Code Coverage in android studio

百般思念 提交于 2019-11-27 05:33:26
问题 I am trying to generate Jacoco code coverage report. I have used AndroidTestCase for my test classes. I have found using testCoverageEnabled true and using default android -studio default jacoco, ./gradlew connectedCheck or createDebugCoverageReport create the percentage of successfull/fail test cases, but no coverage report. Then I have tried jacoco {toolVersion "0.7.1.201405082137"}, and task jacocoTestReport(type:JacocoReport, dependsOn: "testDebug"). I have tried to change the dependsOn