code-coverage

Code coverage with Xcode 4.2 - Missing files

我们两清 提交于 2019-12-17 22:54:03
问题 I followed Claus's post to set up code coverage on Xcode 4.2 with LLVM 3.0. I'm able to see test coverage files, but they're only for my unit test classes, not my actual project classes. I've tried setting Generate Test Coverage Files and Instrument Program Flow to Yes on my main target, but that didn't help, as it failed with the following error: fopen$UNIX2003 called from function llvm_gcda_start_file To clarify, I don't think that's even the right approach - I just tried it to see if it

Xcode5 Code Coverage (from cmd-line for CI builds)

我是研究僧i 提交于 2019-12-17 22:41:56
问题 How can I generate code coverage with Xcode 5 and iOS7? Prior to upgrading I was getting code coverage just fine. Now I can't see any *.gcda files being produced. The cmd-line that I'm using is: xcodebuild -workspace ${module.name}.xcworkspace test -scheme ${module.name} -destination OS=${module.sdk.version},name=iPad -configuration Debug Works with AppCode When I execute the tests via AppCode I can see *.gcda files being produced in ~/Library/Caches/appCode20/DerivedData. . . I need this to

Unit testing code coverage - do you have 100% coverage?

纵饮孤独 提交于 2019-12-17 22:14:39
问题 Do your unit tests constitute 100% code coverage? Yes or no, and why or why not. 回答1: No for several reasons : It is really expensive to reach the 100% coverage, compared to the 90% or 95% for a benefit that is not obvious. Even with 100% of coverage, your code is not perfect. Take a look at this method (in fact it depends on which type of coverage you are talking about - branch coverage , line coverage ...): public static String foo(boolean someCondition) { String bar = null; if

Karma/Istanbul Code Coverage does not find functions and always returns 100%

被刻印的时光 ゝ 提交于 2019-12-17 19:53:40
问题 I am attempting to add Code Coverage for my Karma tests, however although it finds the correct JS files that I'm testing, it does not find the functions inside those files. From what I have read so far I believe it to be to do with the files not being correctly browserified before being passed to istanbul to do the coverage, but admittedly I am new to this so I'm hoping for some suggestions. Here is my JS file(common.js): var applicationSettings = require('./settings'); var common = {

Display OpenCover results in TFS 2015 build Summary

痞子三分冷 提交于 2019-12-17 19:24:18
问题 I have generated my xml coverage file as part of CI build on the TFS server using vNext 2015 build definition. How would one display the results in the TFS 2015 summary ? Either using the xml report or the html generated using the ReportGenerator. 回答1: You need to convert the results produced by OpenCover to a format which can be parsed by TFS. One way to do this would be to use the OpenCoverToCoberturaConverter NuGet package. Once you have that, you can use the Publish Code Coverage Results

How to use MS code coverage tool in command line?

风流意气都作罢 提交于 2019-12-17 16:40:42
问题 I have the following C++ code. #include <iostream> using namespace std; int testfunction(int input) { if (input > 0) { return 1; } else { return 0; } } int main() { testfunction(-1); testfunction(1); } I compiled it to get the execution cl /Zi hello.cpp -link /Profile Then, I instrument the execution and generated the .coverage binary. vsinstr -coverage hello.exe start vsperfmon -coverage -output:mytestrun.coverage vsperfcmd -shutdown When I open the coverage file in VS2010, I got nothing in

Dead code detection in PHP [closed]

◇◆丶佛笑我妖孽 提交于 2019-12-17 10:17:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I have a project with very messy code - lots of duplication and dead code here and there. Some time ago there was zero code coverage

Detailed guide on using gcov with CMake/CDash?

回眸只為那壹抹淺笑 提交于 2019-12-17 10:16:01
问题 I'm using CMake with my project and set up a cdash server for continuous/nightly building. Everything works well and by setting up a crontab, we have hourly/nightly build/test results uploaded to our cdash server automatically. My next step is to add test coverage report to the build. I find the document here http://www.cmake.org/Wiki/CTest:Coverage but frankly it's a bit far from a practical guide. Currently I've added the required flag (instead of -fprofile-arcs -ftest-coverage , I find -

jacoco simple integration test solution

浪尽此生 提交于 2019-12-17 10:03:23
问题 I am following the standard Maven pattern where I use a separate module for integration tests. This module has a wrapper class that executes the major dependent jar project. While the jar project has its own test cases, I am not interested in executing these. I want to see code coverage in the jar project when executed by the integration tests. Simple, no report aggregation. 回答1: Let me quote http://www.jacoco.org/jacoco/trunk/doc/report-aggregate-mojo.html even if its name contains a kind of

How can I unit test a GUI?

戏子无情 提交于 2019-12-17 08:02:32
问题 The calculations in my code are well-tested, but because there is so much GUI code, my overall code coverage is lower than I'd like. Are there any guidelines on unit-testing GUI code? Does it even make sense? For example, there are graphs in my app. I haven't been able to figure out how to automate the testing of the graphs. It takes a human eye, AFAIK, to check if the graph is correct. (I'm using Java Swing) 回答1: Designs like MVP and MVC typically try to abstract as much logic out of the