Re: [java code coverage] Maven plugin prepare-agent does not generate ${destFile} when Surefire forkMode=never

2014-04-14 Thread Mirko Friedenhagen
Hello Marc, I could try to detect the surefire setting, though I have no clue whether this is a trivial task. Documenting the behavior is a simple workaround. Regards Mirko -- Sent from my mobile On Apr 14, 2014 8:30 PM, Marc R. Hoffmann hoffm...@mountainminds.com wrote: Hi, thanks for this

Re: [java code coverage] code coverage and try-finally

2014-12-22 Thread Mirko Friedenhagen
Silvio, the java compiler is probably creating multiple branches in byte code for your source. The number of branches depend on the jdk version. Just search in your favorite search engine for jacoco try finally. Regards Mirko -- Sent from my mobile On Dec 22, 2014 9:36 AM,

Re: [java code coverage] Jacoco not showing coverage from powermock unit test cases.

2015-05-06 Thread Mirko Friedenhagen
Hello Leela, please just google for jacoco and powermock, both modify the loaded classes, so depending on your scenario different approaches are valid. Regards Mirko -- Sent from my mobile On May 6, 2015 7:05 PM, leela kumili lkum...@gmail.com wrote: Have a multi-module maven project. Each

Re: [java code coverage] Change name of JaCoCo ".resources" directory?

2015-10-20 Thread Mirko Friedenhagen
Hello Michael are you using mvn site? Just create a file src/sites/resources/.nojekyll otherwise GitHub will take a gh-pages branch as to be processed by the Jekyll blog software. Regards Mirko -- Sent from my mobile Am 20.10.2015 15:49 schrieb "Michael Remijan" : > It

Re: [java code coverage] How to configure jacoco for integration tests written in jersey test framework

2016-06-07 Thread Mirko Friedenhagen
Hello, if you only execute one module the other modules will be pulled from your maven repository manager and the class files will probably be different. So this is to be expected. Regards Mirko -- Sent from my mobile Am 07.06.2016 20:31 schrieb "Thanuku Krishna Chaitanya" <

Re: [java code coverage] How to configure jacoco for integration tests written in jersey test framework

2016-06-07 Thread Mirko Friedenhagen
Hello Thanuku, * you have to include all modules for which you want to have the aggregated report as dependencies of the aggregating module * in your aggregating module you only need the report-aggregate execution. * you have to bind the execution to a phase, e.g. verify. See

Re: [java code coverage] How to configure jacoco for integration tests written in jersey test framework

2016-06-07 Thread Mirko Friedenhagen
Hello Thanuku, I have seen this as well, when I had scope for a dependency. Just to be sure: the single module reports are created correctly? Aggregate only collects previously created jacoco.exec files. Regards Mirko -- Sent from my mobile Am 07.06.2016 17:19 schrieb "Thanuku Krishna

Re: [java code coverage] Jacoco creates a tmp folder which has a very lengthy name

2016-03-07 Thread Mirko Friedenhagen
Hello Sahana, it looks like your build server is running on Windows. Back in the day I always set my basic workspace directory to sth. like C:\\ws to make sure I do not run into the 255 character path limit. Regards Mirko -- Sent from my mobile Am 04.03.2016 20:36 schrieb

Re: [java code coverage] Maven site integration for projects with offline instrumentation

2016-04-19 Thread Mirko Friedenhagen
Hello Florian, did you put the reporting section into the profile as well? This should just work AFAIK. Regards Mirko -- Sent from my mobile Am 19.04.2016 13:42 schrieb : > Hi, > > In our project we use offline instrumentation as we are doing AspectJ > compile-time weaving.

Re: [java code coverage] Maven site integration for projects with offline instrumentation

2016-04-20 Thread Mirko Friedenhagen
eport-plugin:2.19.1:report < [surefire]test @ >>> PROJECT <<< >>> >>> >>> So, surefire-reports reruns surefire:test with all the preparation >>> steps. Whereas surefire:test detects that it was already ran, >>> jacoco:instrument doe

Re: [java code coverage] "Skipping JaCoCo execution due to missing execution data file." only in CI environment

2016-07-04 Thread Mirko Friedenhagen
Hello, you could try to use Maven 3.3.9 as well in Travis, see https://github.com/mojohaus/mojo-parent/blob/master/.travis.yml for how to use the takari wrapper plugin. Regards Mirko -- Sent from my mobile Am 04.07.2016 22:15 schrieb : > Hello, > > I am trying to

Re: [java code coverage] "Skipping JaCoCo execution due to missing execution data file." only in CI environment

2016-07-04 Thread Mirko Friedenhagen
Output here: https://gist.githubusercontent.com/patrickpilch/21d32e367b312443c98cbf2bcaa687fa/raw/fac1d3372bb24d18f3df7fcba5a8acc9a0c4296a/wrapper_test.txt On Monday, July 4, 2016 at 4:36:02 PM UTC-5, Mirko Friedenhagen wrote: > Hello, > > you could try to use Maven 3.3.9 as well in Travis

[java code coverage] Off by behavior for source code lines with kotlin?

2017-01-25 Thread Mirko Friedenhagen
Hello, I am playing with Kotlin and tried to do a POC for a SonarQube plugin[0] While doing this I encountered a strange behavior (at least for me) SonarQube iterates on iSourceFileCoverage and checks that the number of lines in iSourceFileCoverage do not exceed the number of lines of the

Re: [java code coverage] Off by behavior for source code lines with kotlin?

2017-01-26 Thread Mirko Friedenhagen
Hello, just for the record: But in the kotlin-tracker https://youtrack.jetbrains.com/issue/KT-16002 Regards Mirko Regards Mirko -- http://illegalstateexception.blogspot.com/ https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen) https://bitbucket.org/mfriedenhagen/ On Thu, Jan

Re: [java code coverage] Re: Best way to view JaCoCo.exec

2017-02-17 Thread Mirko Friedenhagen
Hello, one hint: reports using the Maven plugin may report different coverages than the ones found in SonarQube because aggregation done by the tools is different. So if you have hard limits for a failing QA gate in SonarQube you may have discussions with developers. Regards Mirko -- Sent from

Re: [java code coverage] default lifecycle phase of jacoco:prepare-agent

2016-11-12 Thread Mirko Friedenhagen
t be i miss something here? > > For the skip - do you run these projects with skipTests set? > > Kind Regards, > Andreas. > > > Am Samstag, 29. Oktober 2016 12:59:52 UTC+2 schrieb Mirko Friedenhagen: > > Hello, > > > > you mean skip when maven.test.

Re: [java code coverage] default lifecycle phase of jacoco:prepare-agent

2016-10-29 Thread Mirko Friedenhagen
Hello, you mean skip when maven.test.skip is set? You may achieve this easily by referencing this property in the default-prepare-agent execution. There you may easily redefine the bound phase as well. I use jacoco in projects which have no tests run by surefire or failsafe but the invoker

Re: [java code coverage] Does JaCoCo work with mocking frameworks?

2017-10-04 Thread Mirko Friedenhagen
Hello, at my company we use jacoco with mockito all the time, power-mockito or any framework which manipulates the classes when loading them is more tricky. Regards Mirko -- Sent from my mobile Am 05.10.2017 03:37 schrieb : > I've banging my head against the wall

Re: [java code coverage] JaCoCo Test Coverage Badges?

2018-02-11 Thread Mirko Friedenhagen
Hello, another caveat: which metric to use for this. I would go for complexity, as it is the most valuable IMO. Best regards Mirko -- Sent from my mobile Am 11.02.2018 22:42 schrieb "Marc Hoffmann" : > Hi Andy, > > If the coverage is greater than or equal to the

Re: [java code coverage] what if I want the coverage of the different code between my branch and master

2018-08-24 Thread Mirko Friedenhagen
Hello, a bit off-topic, please hop to the sonarqube forum for further details. Basically you have to create the coverage beforehand by running e.g. “mvn Test” after configuring the jacoco-maven-plugin in your project. mvn sonar:sonar will then pick up the coverage data and show you detailed

Re: [java code coverage] what if I want the coverage of the different code between my branch and master

2018-08-22 Thread Mirko Friedenhagen
Hello, I do not think Jacoco offers this out of the box. What you would need is historisation of data. I would recommend to setup sonarqube for this which will not only historise coverage but additionally will do a lot of other useful analysises of your code which will help you to find and fix

Re: [java code coverage] Jenkins Plugin and Jacoco Agent Jar delivered exec file

2018-04-11 Thread Mirko Friedenhagen
Hello Aswak, this is something you would better ask on the jenkins user mailing list, as the jacoco developers do not track which versions of derived software are using which version of jacoco itself. That said I do not think there is a wiki-page, however you could go to the github page of the

Re: [java code coverage] Combined results for Maven surefire and failsafe?

2018-03-22 Thread Mirko Friedenhagen
Hello Mike, if you only configure the goals "prepare-agent" and "report" as executions the coverage should be automatically measured for tests run by surefire and failsafe combined. Just *do not* define executions for prepare-agent-integration resp. report-integration. Could you show the