[java code coverage] Re: A problem of api: Analyzer # analyzeClass

2023-10-16 Thread Marc R. Hoffmann
Hi,

if the underlying stream throws an IOException or if the content of the 
stream causes a problem, for example in case of invalid class file formats.

Regards,
-marc


赵无敌 schrieb am Donnerstag, 12. Oktober 2023 um 08:35:05 UTC+2:

I got a problem using jacoco ,
the   stack trace shows the error was happened at Analyzer # analyzeClass

/**
 * Analyzes the class definition from a given input stream. The provided
 * {@link InputStream} is not closed by this method.
 *
 * @param input
 *stream to read class definition from
 * @param location
 *a location description used for exception messages
 * @throws IOException
 ** if the stream can't be read or the class can't be analyzed*
 */
public void analyzeClass(final InputStream input, final String location)
  throws IOException {
   final byte[] buffer;
   try {
  buffer = InputStreams.readFully(input);
   } catch (final IOException e) {
  throw analyzerError(location, e);
   }
   analyzeClass(buffer, location);
}

how to understand the  ' if the stream can't be read or the class can't be 
analyzed  ?'

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/0bed6943-e2f6-48c7-8264-8c1841f2ecd0n%40googlegroups.com.


Re: [java code coverage] Unable to read /tmp/myprojectcoverage.exec Can anybody help to resolve it?

2019-05-24 Thread Marc R. Hoffmann
Oh no, please don't. We will not process this amount of data for you.

Instead explore the execfile locally with our command line utility 
<https://www.jacoco.org/jacoco/trunk/doc/cli.html> execinfo. You will 
probably get an idea why it grows that big if you see the sessions and 
classes appended to the file.

Regards,
-marc 

Am Montag, 20. Mai 2019 10:57:57 UTC+2 schrieb rverm:
>
> File size is almost ~8G. Will try to upload it here.
>
> On Friday, May 17, 2019 at 4:43:27 PM UTC+5:30, Evgeny Mandrikov wrote:
>>
>>
>>
>> On Friday, May 17, 2019 at 10:20:28 AM UTC+2, rverm wrote:
>>>
>>>
>>> The /tmp/abcuser/myprojectcoverage_.exec file which is getting created 
>>> is too big in size with a lot of session entries which might be causing the 
>>> corruption.
>>>
>>
>>
>> IMO this is very strange statement - how size can cause corruption?
>> unless if you are running out of space, but then how multiple files would 
>> help?
>> what is "too big" exactly?
>>
>>  
>>
>>> Is there a way I can limit .exec file size and when given size is 
>>> reached create new  .exec file ?
>>> (like loggers /tmp/abcuser/myprojectcoverage_1.exec /tmp/abcuser/
>>> myprojectcoverage_2.exec /tmp/abcuser/myprojectcoverage_3.exec and so 
>>> on)
>>>
>>
>>
>> In addition to what Marc said, let me point that all available options 
>> are documented - https://www.jacoco.org/jacoco/trunk/doc/
>>
>>  
>>
>>> On Tuesday, May 14, 2019 at 5:13:52 PM UTC+5:30, rverm wrote:
>>>>
>>>> Thanks for the help! will check what is causing the issue.
>>>>
>>>> On Monday, May 13, 2019 at 8:46:51 PM UTC+5:30, Evgeny Mandrikov wrote:
>>>>>
>>>>> We can't tell you what causes corruption of file, because just snippet 
>>>>> of your build.gradle is not enough to reproduce this. There are many 
>>>>> potential reasons, listing some:
>>>>>
>>>>>- something else performs access to this file, ignoring lock held 
>>>>>by JaCoCo agent
>>>>>- including case when multiple JaCoCo agents write to the same 
>>>>>file, while filesystem doesn't properly support locking
>>>>>- including case when JVM running one of such agents is not 
>>>>>terminated gracefully but forcibly killed
>>>>>- not forgetting the case of network filesystems
>>>>>- including case of Docker volumes, which can cause troubles to 
>>>>>certain types of file access - for example 
>>>>>
>>>>> https://stackoverflow.com/questions/56066775/docker-container-cant-run-jacoco-agent-with-java-12#comment98799428_56066775
>>>>>- maybe something else touches/write to this file
>>>>>- disk is broken
>>>>>- etc, etc
>>>>>
>>>>>
>>>>>
>>>>> On Monday, May 13, 2019 at 1:07:41 PM UTC+2, rverm wrote:
>>>>>>
>>>>>> Thank you for looking into this issue.
>>>>>>
>>>>>> I am running jvm with jacocoagent which is creating this file but I 
>>>>>> ail to understand why file is getting corrupted.
>>>>>>
>>>>>>
>>>>>> -javaagent:/tmp/jacoco/jacocoagent.jar=destfile=/tmp/myproject_coverage/
>>>>>> myprojectcoverage_
>>>>>> ${HOST}.exec,append=true,output=file,inclbootstrapclasses=true,inclnolocationclasses=true"
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Monday, May 13, 2019 at 1:33:58 PM UTC+5:30, Marc R. Hoffmann 
>>>>>> wrote:
>>>>>>>
>>>>>>> org.gradle.api.tasks.TaskExecutionException: Execution failed for 
>>>>>>> task ':myproject:jacocoMergeTest'.
>>>>>>> Caused by: : Unable to read /tmp/abcuser/myprojectcoverage_.exec
>>>>>>> Caused by: java.io.IOException: Unknown block type 0.
>>>>>>>
>>>>>>>
>>>>>>> ==> myprojectcoverage_.exec is not a valid exec file. 
>>>>>>>
>>>>>>>
>>>>>>> On 2019-05-13 09:44, rverm wrote:
>>>>>>>
>>>>>>> This is the output with --stacktrace
>>>>>>>  
>>

Re: [java code coverage] Lombok filter

2017-08-25 Thread Marc R. Hoffmann
This is not supported by EclEmma. You can only include/exclude on 
package fragment root level.


If you use one of our build tool integrations you get a finer control.

On 25.08.17 16:22, drackmor...@gmail.com wrote:

On Friday, 25 August 2017 15:11:07 UTC+1, Marc R. Hoffmann  wrote:

The only way I know is to build your own version. Here is our Git repo:
https://github.com/eclipse/eclemma

"mvn clean install" should do the job. You need to bump the JaCoCo
version and use our SNAPSHOT repository, see:
http://www.jacoco.org/jacoco/trunk/doc/repo.html

Regards,
-marc



On 25.08.17 15:56, drackmor...@gmail.com wrote:

On Friday, 25 August 2017 14:28:09 UTC+1, Marc R. Hoffmann  wrote:

Hi Matteo,

this feature is not yet released in JaCoCo, only in SNAPSHOT builds. See
change log.

As soon as we have a JaCoCo release we will update EclEmma.

Regards,
-marc



On 25.08.17 15:06, drackmor...@gmail.com wrote:

Hello there,
I'm happily using EclEmma but the only thing I miss is properly make it ignore 
generated methods from Lombok: I see on the Jacoco changelog that this feature 
was included recently but I still can't figure out if there is a way to 
configure EclEmma to use it.

I checked that Lombok is adding the @lombok.Generated annotation to my bytecode.
Anyone that succeeded in making it work?

Thank you in advance,
Matteo


Thank you for your reply.
Just to make sure, is there any way to make EclEmma use a different Jacoco 
version manually?


Thank you! I'll try it next week. One last question, if I may ask: what is the most correct way to 
exclude single classes from the coverage reports? I read in the documentation that "Coverage 
Runtime" section in eclipse preferences does not serve this purpose, but the "Default 
Scope" section does only allow me to set a path matching pattern, which is not usable if you 
have hundreds of classes you want to cover and just 2-3 classes that you want to exclude.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/df4af0b1-15ba-4ed4-7359-e7e9d9870de3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] How to append existing coverage report in new coverage report

2017-08-25 Thread Marc R. Hoffmann

Good to hear! Note that append=true is the default anyways.

On 25.08.17 16:04, Naveen Gupta wrote:

Hi Marc,

Thanks for valauble advise, please review below mentioned pom.xml



org.jacoco

jacoco-maven-plugin

0.7.9



${maven.test.skip}



true







jacoco-initialize



prepare-agent







${project.build.directory}/target/jacoco.exec







jacoco-site

verify



report







${project.build.directory}/target/jacoco.exec





undefinedundefined

org.apache.maven.plugins

maven-surefire-plugin

2.12.2





**/${testGroup}/*Test.java





web/target/jacoco.exec



-Xms256m -Xmx2048m -XX:MaxPermSize=2048m







org.apache.maven.plugins

maven-compiler-plugin

3.2



${java.version}

${java.version}






This is actually works for me.

Regards
Naveen




On Fri, Aug 25, 2017 at 7:02 PM, Marc R. Hoffmann 
mailto:hoffm...@mountainminds.com>> wrote:


Hi,

it is not possible to merge already generated coverage reports.

But you can (re-)create a coverage report based on execution data
from multiple runs. There are multiple ways to do this:

  * Merge multiple exec files into a single one (see merge goal)
  * Create the report with multiple exec files as input
  * Let the JaCoCo agent append exec data to a single file (this
is how you already configured your agent)

However it is not possible to merge execution data when class
files have been changed between the individual test runs.

Regards,
-marc


On 25.08.17 12:10, naveen4...@gmail.com
<mailto:naveen4...@gmail.com> wrote:

How to append existing coverage report in new coverage report

Hi All,

I am working on application, where after every 2 hours we need to update 
the build means need to replace ROOT.war in tomcat/webapps.

Is there any way append existing report in new coverage report.

Changes in POM.xml:


org.jacoco
jacoco-maven-plugin
0.7.9

 ${maven.test.skip}
  
 true
 
 
 
 jacoco-initialize
 
 prepare-agent
 

 
 
${project.build.directory}/target/jacoco.exec

 
 
 jacoco-site
 verify
 
 report
 

 
 
${project.build.directory}/target/jacoco.exec

 
 



Changes in Catlina.sh: set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%  
-javaagent:D:\jacoco-0.7.9\lib\jacocoagent.jar=destfile=D:\jacoco\jacoco.exec,append=true,includes=*,output=file

Please suggest if there is any way to do that


-- You received this message because you are subscribed to a topic
in the Google Groups "JaCoCo and EclEmma Users" group. To
unsubscribe from this topic, visit
https://groups.google.com/d/topic/jacoco/mG6nkrcnVdE/unsubscribe
<https://groups.google.com/d/topic/jacoco/mG6nkrcnVdE/unsubscribe>.
To unsubscribe from this group and all its topics, send an email
to jacoco+unsubscr...@googlegroups.com
<mailto:jacoco+unsubscr...@googlegroups.com>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/jacoco/4f4a009c-a1da-117f-73da-a47e0ac52160%40mountainminds.com

<https://groups.google.com/d/msgid/jacoco/4f4a009c-a1da-117f-73da-a47e0ac52160%40mountainminds.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>. 

-- You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this 
group and stop receiving emails from it, send an email to 
jacoco+unsubscr...@googlegroups.com 
<mailto:jacoco+unsubscr...@googlegroups.com>. To view this discussion 
on the web visit 
https://groups.google.com/d/msgid/jacoco/CA%2Bqs%2BRJqtNfLea1mSM9vRvZ6knaM5dJfM%2BBe12oFsUXEXKTiuw%40mail.gmail.com 
<https://groups.google.com/d/msgid/jacoco/CA%2Bqs%2BRJqtNfLea1mSM9vRvZ6knaM5dJfM%2BBe12oFsUXEXKTiuw%40mail.gmail.com?utm_medium=email&utm_source=footer>. 
For more options, visit https://groups.google.com/d/optout. 


--
You receiv

Re: [java code coverage] Lombok filter

2017-08-25 Thread Marc R. Hoffmann
The only way I know is to build your own version. Here is our Git repo: 
https://github.com/eclipse/eclemma


"mvn clean install" should do the job. You need to bump the JaCoCo 
version and use our SNAPSHOT repository, see: 
http://www.jacoco.org/jacoco/trunk/doc/repo.html


Regards,
-marc



On 25.08.17 15:56, drackmor...@gmail.com wrote:

On Friday, 25 August 2017 14:28:09 UTC+1, Marc R. Hoffmann  wrote:

Hi Matteo,

this feature is not yet released in JaCoCo, only in SNAPSHOT builds. See
change log.

As soon as we have a JaCoCo release we will update EclEmma.

Regards,
-marc



On 25.08.17 15:06, drackmor...@gmail.com wrote:

Hello there,
I'm happily using EclEmma but the only thing I miss is properly make it ignore 
generated methods from Lombok: I see on the Jacoco changelog that this feature 
was included recently but I still can't figure out if there is a way to 
configure EclEmma to use it.

I checked that Lombok is adding the @lombok.Generated annotation to my bytecode.
Anyone that succeeded in making it work?

Thank you in advance,
Matteo


Thank you for your reply.
Just to make sure, is there any way to make EclEmma use a different Jacoco 
version manually?



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/b41582d0-429c-461a-c4eb-fd540cad99da%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] How to append existing coverage report in new coverage report

2017-08-25 Thread Marc R. Hoffmann

Hi,

it is not possible to merge already generated coverage reports.

But you can (re-)create a coverage report based on execution data from 
multiple runs. There are multiple ways to do this:


 * Merge multiple exec files into a single one (see merge goal)
 * Create the report with multiple exec files as input
 * Let the JaCoCo agent append exec data to a single file (this is how
   you already configured your agent)

However it is not possible to merge execution data when class files have 
been changed between the individual test runs.


Regards,
-marc


On 25.08.17 12:10, naveen4...@gmail.com wrote:

How to append existing coverage report in new coverage report

Hi All,

I am working on application, where after every 2 hours we need to update the 
build means need to replace ROOT.war in tomcat/webapps.

Is there any way append existing report in new coverage report.

Changes in POM.xml:


org.jacoco
jacoco-maven-plugin
0.7.9

 ${maven.test.skip}
  
 true
 
 
 
 jacoco-initialize
 
 prepare-agent
 

 
 
${project.build.directory}/target/jacoco.exec

 
 
 jacoco-site
 verify
 
 report
 

 
 
${project.build.directory}/target/jacoco.exec

 
 



Changes in Catlina.sh: set JAVA_OPTS=%JAVA_OPTS% %LOGGING_MANAGER%  
-javaagent:D:\jacoco-0.7.9\lib\jacocoagent.jar=destfile=D:\jacoco\jacoco.exec,append=true,includes=*,output=file

Please suggest if there is any way to do that



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/4f4a009c-a1da-117f-73da-a47e0ac52160%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Lombok filter

2017-08-25 Thread Marc R. Hoffmann

Hi Matteo,

this feature is not yet released in JaCoCo, only in SNAPSHOT builds. See 
change log.


As soon as we have a JaCoCo release we will update EclEmma.

Regards,
-marc



On 25.08.17 15:06, drackmor...@gmail.com wrote:

Hello there,
I'm happily using EclEmma but the only thing I miss is properly make it ignore 
generated methods from Lombok: I see on the Jacoco changelog that this feature 
was included recently but I still can't figure out if there is a way to 
configure EclEmma to use it.

I checked that Lombok is adding the @lombok.Generated annotation to my bytecode.
Anyone that succeeded in making it work?

Thank you in advance,
Matteo




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/42ba6610-bead-3c70-bd69-cac26ffae553%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: Unable to read execution data file

2017-08-24 Thread Marc R. Hoffmann
As said before the only situation we know when this happens is when the 
main method of a Java program exits with the interrupted thread status. 
Have you checked this?


On 24.08.17 21:45, danieljrutle...@gmail.com wrote:

On Thursday, August 24, 2017 at 9:16:18 AM UTC-5, Marc R. Hoffmann wrote:

Hi,

all JaCoCo tools will always throw an exception in truncated exec files.
The reports will be incomplete anyways.

If you're ok with an incomplete report I created a code snippet for you
which can heal the exec file for you:
https://gist.github.com/marchof/19aebb567ca4598c77b391460da39376

But please be warned: All classes that have been truncated will show as
uncovered in the coverage report. I would rather recommend to fix the
root cause.

Regards,
-marc

On 23.08.17 22:12, danieljrutle...@gmail.com wrote:

On Tuesday, August 15, 2017 at 4:08:40 PM UTC-5, suhas nvk wrote:

Hi,
We are observing the "Unable to read execution data file" error consistently 
when we run our builds on TeamCity agents that have the Linux operating system.  We 
believe the generated jacoco exec file is getting corrupted.
Can you please help us in resolving this error?

Jacoco version is 0.7.7.201606060606
Java version is  1.8.0_131
Ant version is 1.9.5

Following is the stacktrace of the error.
[jacoco:report] Loading execution data file 
/local/home/tcagent/TeamCityAgent/work/7cf8c5b5cc582291/build/tmp/pdk/jacoco/coverage/jacoco.exec
[12:22:35][jacoco:report] Unable to read execution data file 
/local/home/tcagent/TeamCityAgent/work/7cf8c5b5cc582291/build/tmp/pdk/jacoco/coverage/jacoco.exec
[12:22:35]
[antcall] The following error occurred while executing this line:
/local/home/tcagent/TeamCityAgent/work/7cf8c5b5cc582291/build/utils/buildinclude/build-quality.xml:1079:
 Unable to read execution data file 
/local/home/tcagent/TeamCityAgent/work/7cf8c5b5cc582291/build/tmp/pdk/jacoco/coverage/jacoco.exec

[12:22:35][Step 2/2] Process exited with code 1
[12:22:35][Step 2/2] Ant output
[12:22:35][Ant output]  at 
org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
[12:22:35][Ant output]  at 
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[12:22:35][Ant output]  at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
[12:22:35][Ant output]  at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown 
Source)
[12:22:35][Ant output]  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:22:35][Ant output]  at java.lang.reflect.Method.invoke(Method.java:498)
[12:22:35][Ant output]  at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[12:22:35][Ant output]  at org.apache.tools.ant.Task.perform(Task.java:348)
[12:22:35][Ant output]  at org.apache.tools.ant.Target.execute(Target.java:435)
[12:22:35][Ant output]  at 
org.apache.tools.ant.Target.performTasks(Target.java:456)
[12:22:35][Ant output]  at 
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
[12:22:35][Ant output]  at 
org.apache.tools.ant.Project.executeTarget(Project.java:1376)
[12:22:35][Ant output]  at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[12:22:35][Ant output]  at 
org.apache.tools.ant.Project.executeTargets(Project.java:1260)
[12:22:35][Ant output]  at org.apache.tools.ant.Main.runBuild(Main.java:853)
[12:22:35][Ant output]  at org.apache.tools.ant.Main.startAnt(Main.java:235)
[12:22:35][Ant output]  at 
org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
[12:22:35][Ant output]  at 
org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
[12:22:35][Ant output] Caused by: java.io.EOFException
[12:22:35][Ant output]  at 
java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
[12:22:35][Ant output]  at 
java.io.DataInputStream.readUTF(DataInputStream.java:589)
[12:22:35][Ant output]  at 
java.io.DataInputStream.readUTF(DataInputStream.java:564)
[12:22:35][Ant output]  at 
org.jacoco.core.data.ExecutionDataReader.readExecutionData(ExecutionDataReader.java:148)
[12:22:35][Ant output]  at 
org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:115)
[12:22:35][Ant output]  at 
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:92)
[12:22:35][Ant output]  at 
org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
[12:22:35][Ant output]  at 
org.jacoco.ant.ReportTask.loadExecutionData(ReportTask.java:514)
[12:22:35][Ant output]  ... 121 more
[12:22:35][Ant output]

Following is the configuration for jacoco

  
  
  

  
  

  
  



  
  
  
  
  
  
  

  

  
  
  



  

  


  

  
  

  


  
  





  


I'm working on 

Re: [java code coverage] Re: JBoss DevStudio 9 and EclEmma

2017-08-24 Thread Marc R. Hoffmann

Please provide the *full* content.

E.g. Plugin details are missing.

On 24.08.17 16:43, ashoreku...@gmail.com wrote:

On Thursday, August 24, 2017 at 10:23:57 AM UTC-4, ashor...@gmail.com wrote:

I had installed EclEmma on Jboss Deve Studio 9
However,I cannot see EclEmma Launch on toolbar.

I'm not able to find Commands tab to enable the Coverage command group as 
mentioned on link below:

http://www.eclemma.org/userdoc/launching.html

Please let me know how I can enable EclEmma on jboss dev studio 9.

Thanks for your reply!!

Please check the Configuration details below:

*** Date: Thursday, August 24, 2017 at 10:40:56 AM Eastern Daylight Time

*** Platform Details:

*** System properties:
applicationXMI=org.eclipse.ui.workbench/LegacyIDE.e4xmi
awt.toolkit=sun.awt.windows.WToolkit
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.commands=-data
file:/C:/JBOSS09/workspace/VisitorForm/
-os
win32
-ws
win32
-arch
x86_64
-showsplash
-launcher
C:\jbdevstudio9\studio\jbdevstudio.exe
-name
Jbdevstudio
--launcher.library
C:\jbdevstudio9\studio\\plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417\eclipse_1611.dll
-startup
C:\jbdevstudio9\studio\\plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.overrideVmargs
-exitdata
8bc_60
-product
com.jboss.devstudio.core.product
-vm
C:/Program Files/Java/jre1.8.0_66/bin/javaw.exe
eclipse.home.location=file:/C:/jbdevstudio9/studio/
eclipse.launcher=C:\jbdevstudio9\studio\jbdevstudio.exe
eclipse.launcher.name=Jbdevstudio
eclipse.p2.data.area=@config.dir/../p2/
eclipse.p2.profile=jbds



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/c5f1c24e-ae19-d58a-38d3-bdbcaf72aa7d%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] JBoss DevStudio 9 and EclEmma

2017-08-24 Thread Marc R. Hoffmann

As JBoss Developer Studio 9 is based on Eclipse Mars this should work.

Can you please provide your installation details? You find it in the 
About dialog:


Help -> About ... -> Installation Details -> Tab Configuration

Please provide the full text shown in the Configuration tab.

Regards,
-marc

On 24.08.17 16:23, ashoreku...@gmail.com wrote:

I had installed EclEmma on Jboss Deve Studio 9
However,I cannot see EclEmma Launch on toolbar.

I'm not able to find Commands tab to enable the Coverage command group as 
mentioned on link below:

http://www.eclemma.org/userdoc/launching.html

Please let me know how I can enable EclEmma on jboss dev studio 9.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/2d923915-48ea-6670-e860-d3d466591b75%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: Unable to read execution data file

2017-08-24 Thread Marc R. Hoffmann

Hi,

all JaCoCo tools will always throw an exception in truncated exec files. 
The reports will be incomplete anyways.


If you're ok with an incomplete report I created a code snippet for you 
which can heal the exec file for you: 
https://gist.github.com/marchof/19aebb567ca4598c77b391460da39376


But please be warned: All classes that have been truncated will show as 
uncovered in the coverage report. I would rather recommend to fix the 
root cause.


Regards,
-marc

On 23.08.17 22:12, danieljrutle...@gmail.com wrote:

On Tuesday, August 15, 2017 at 4:08:40 PM UTC-5, suhas nvk wrote:

Hi,
We are observing the "Unable to read execution data file" error consistently 
when we run our builds on TeamCity agents that have the Linux operating system.  We 
believe the generated jacoco exec file is getting corrupted.
Can you please help us in resolving this error?

Jacoco version is 0.7.7.201606060606
Java version is  1.8.0_131
Ant version is 1.9.5

Following is the stacktrace of the error.
[jacoco:report] Loading execution data file 
/local/home/tcagent/TeamCityAgent/work/7cf8c5b5cc582291/build/tmp/pdk/jacoco/coverage/jacoco.exec
[12:22:35][jacoco:report] Unable to read execution data file 
/local/home/tcagent/TeamCityAgent/work/7cf8c5b5cc582291/build/tmp/pdk/jacoco/coverage/jacoco.exec
[12:22:35]
[antcall] The following error occurred while executing this line:
/local/home/tcagent/TeamCityAgent/work/7cf8c5b5cc582291/build/utils/buildinclude/build-quality.xml:1079:
 Unable to read execution data file 
/local/home/tcagent/TeamCityAgent/work/7cf8c5b5cc582291/build/tmp/pdk/jacoco/coverage/jacoco.exec

[12:22:35][Step 2/2] Process exited with code 1
[12:22:35][Step 2/2] Ant output
[12:22:35][Ant output]  at 
org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:441)
[12:22:35][Ant output]  at 
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[12:22:35][Ant output]  at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
[12:22:35][Ant output]  at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown 
Source)
[12:22:35][Ant output]  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[12:22:35][Ant output]  at java.lang.reflect.Method.invoke(Method.java:498)
[12:22:35][Ant output]  at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[12:22:35][Ant output]  at org.apache.tools.ant.Task.perform(Task.java:348)
[12:22:35][Ant output]  at org.apache.tools.ant.Target.execute(Target.java:435)
[12:22:35][Ant output]  at 
org.apache.tools.ant.Target.performTasks(Target.java:456)
[12:22:35][Ant output]  at 
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
[12:22:35][Ant output]  at 
org.apache.tools.ant.Project.executeTarget(Project.java:1376)
[12:22:35][Ant output]  at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[12:22:35][Ant output]  at 
org.apache.tools.ant.Project.executeTargets(Project.java:1260)
[12:22:35][Ant output]  at org.apache.tools.ant.Main.runBuild(Main.java:853)
[12:22:35][Ant output]  at org.apache.tools.ant.Main.startAnt(Main.java:235)
[12:22:35][Ant output]  at 
org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
[12:22:35][Ant output]  at 
org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
[12:22:35][Ant output] Caused by: java.io.EOFException
[12:22:35][Ant output]  at 
java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
[12:22:35][Ant output]  at 
java.io.DataInputStream.readUTF(DataInputStream.java:589)
[12:22:35][Ant output]  at 
java.io.DataInputStream.readUTF(DataInputStream.java:564)
[12:22:35][Ant output]  at 
org.jacoco.core.data.ExecutionDataReader.readExecutionData(ExecutionDataReader.java:148)
[12:22:35][Ant output]  at 
org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:115)
[12:22:35][Ant output]  at 
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:92)
[12:22:35][Ant output]  at 
org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
[12:22:35][Ant output]  at 
org.jacoco.ant.ReportTask.loadExecutionData(ReportTask.java:514)
[12:22:35][Ant output]  ... 121 more
[12:22:35][Ant output]

Following is the configuration for jacoco
   
 
 
 
   
 
 
   
 
 
   

   
 
 
 
 
 
 
 
   
 
   
 
 
 
   

   
 
   
 
   
   
 
   
 
 
   
 
   
   
 
 
   
   
   
   
   
 
   

I'm working on the same project; is there anyway to prevent the report task 
from running until the test output is complete?



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this d

Re: [java code coverage] jacocoagent and parallelism

2017-08-03 Thread Marc R. Hoffmann
Yes, JaCoCo properly locks the exec files during exec data dumps and 
should therefore be threadsafe.


Regards,
-marc



On 03.08.17 08:33, yevsh wrote:

Hi,

I would like to know if jacocoagent  that attached to multiple jvm 
executions (jars), that write to same file (append=true) supports 
parallelism (thread safe)?


Thanks
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/d0a5dff6-e5bf-4c97-a5c8-d7bf077cd017%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/d76f3d8f-3764-57ce-a8ed-13163000fa61%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] jacoco classdumpdir feature gives diffenent count of classes

2017-07-26 Thread Marc R. Hoffmann
Use the original classes from the JAR files to create your report. Note 
that JaCoCo can directly read JAR files.


Regards,
-marc

On 27.07.17 05:11, maurya.p...@gmail.com wrote:

I have classes bundled into different jar, at IT(integration tests are ) phase, 
the server  ( glassfish server) is started with these jars in classpath and IT 
are run. I attach jacoco agent to server jvm process which creates a 
jacoco.exec files.

I am currently using "classdumpdir"  to dump the classes in one particular 
folder and use that folder in report generation. The problem is on each run I get 
different number of classes in that folder, that changes the coverage value every time? 
Am I doing something wrong ?




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/fdb9546b-4d82-235b-75ae-f5bf29946e76%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Feature request: Detection of duplicate test coverage in JaCoCo

2017-06-26 Thread Marc R. Hoffmann

Hi Jakub,

thanks for the proposal and the detailed description! Some remarks your 
possible solution:


 * JaCoCo is a code coverage tool with low overhead and scales even for
   very large test sets. Collecting additional information like call
   traces and execution times are clearly out of scope.
 * To clearly manage expectations: Of course you can implement this
   based on the free JaCoCo. But unless you come up with a solution
   with very little additional complexity and overhead it is very
   unlikely that we will incorporate this into the JaCoCo main
   development line.
 * JaCoCo simply sees Java classes, it has no notion of e.g. JUnit test
   cases.

But I think there is a slightly different solution which should solve 
your problem (this solution is already implemented in SonarQube to some 
extend):


 * Implement a JUnitExecutionListener which uses the public JaCoCo
   runtime API
   
.
 * The execution listener creates a separate session id and dump for
   every test case.
 * Implement a new Analyzer based on the JaCoCo analysis APIs which
   combines multiple sessions into a single report. Note that the exec
   files already contains dump timestamps.


Cheers,
-marc

On 26.06.17 09:04, Jakub Schwan wrote:


With increasing number of tests, their execution time increases as 
well. Currently, various tools provide metrics of test code coverage. 
These metrics however do not help identify duplicate test coverage, 
that leads only to unnecessary increase of test execution time without 
any benefit to effective code coverage. Information about duplicate 
coverage and execution time of duplicate tests would be a valuable 
help for subsequent refactoring of test code base.


JaCoCo is very useful tool and with this new functionality we can 
provide more helpful information about the test coverage.


_Possible solution:_

1.

Extend the data file format to include data about

 *

Caller (test invoking the piece of code e.g.: line, branch,
method, class,…)

 *

Time spent in the piece of code

2.

Enhance the code coverage tool to store information described in
point 1

3.

Enhance the tool’s reporting capabilities to present information about

 *

Duplicate code coverage

 *

Time spent in running tests

I have no problem to discuss about better solutions.

_What I want to do:_

I want to implement solution and write a bachelor thesis at my 
university (Faculty of Informatics, Masaryk University, Brno, Czech 
Republic) about this.


_Expected result:_

Functional solution and report capability to present information.



How do you like this idea? Best regard,
Jakub Schwan
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/cdd5ecf2-a2b8-4488-8e13-4b3928fb0a6f%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/bedef632-11dd-4d68-bd25-3f0ded9ab112%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Interfaces with default methods are not present in the report on Jenkins

2017-06-23 Thread Marc R. Hoffmann

Hi Radu,

please let me ask some questions to make sure I fully understand your setup:

1) By "running on Jenkins" you mean executing your Maven build within 
jenkins, right?

2) You're not using the JaCoCo Jenkins plugin at all, right?
3) The interfaces with default methods do show in the coverage report 
but the default methods are not marked as executed (red), right?
4) The interfaces are not listed on the "Sessions" page of the JaCoCo 
HTML report, right?


Cheers,
-marc

On 23.06.17 11:23, r...@cotescu.com wrote:

Hello Jacoco users and devs,

I have a relatively weird problem on my hands and after one day of doing 
everything that I could have thought of I still haven't found a solution.

In our project we have a set of public interfaces with default methods. The 
default behaviour is that they throw UnsupportedOperationException, allowing 
the implementations to decide which API level they want to support.

Since I wanted the team to use the same pattern for these interfaces, I've also 
added a unit test that checks that all the interfaces from the public API 
packages respect this pattern, by making sure we only expose default methods 
and that when invoked (using reflection) they throw UOE.

Running the build locally on Mac OS X (Java 1.8.0_112, HotSpot), Windows 
(1.8.0_121) and Linux (OpenJDK 1.8.0_131) everything works perfectly:

1. JaCoCo runs offline instrumentation (because we also have to use Powermock 
for some of the tests)
2. we run the tests
3. JaCoCo restores the classes
4. we generate the coverage report
5. we run the check (every class has to be at least 80% covered, same applies 
for the project)

When we try to run the same thing on Jenkins the check fails, since the 
interfaces I told you about are not analysed at all.

Jenkins runs Java 1.8.0_121, also HotSpot. Comparing a local session with the 
one from Jenkins clearly shows that the interfaces are missing altogether from 
the analysis on Jenkins. Running the build in debug mode (mvn -X) didn't show 
anything revealing. There's no JaCoCo plugin installed on Jenkins that could 
clash with the project's setup.

Any advice about what should I check more?

For reference, this is the JaCoCo config (both the plugin and the agent have 
the same version - currently 0.7.6, but I've had the same results with 0.7.9):

 
 org.jacoco
 jacoco-maven-plugin
 
 
 default-instrument
 
 instrument
 
 
 
 default-restore-instrumented-classes
 
 restore-instrumented-classes
 
 
 
 check-coverage
 
 check
 
 
 true
 
${project.build.directory}/coverage.exec
 
 
 BUNDLE
 
 
 INSTRUCTION
 COVEREDRATIO
 0.80
 
 
 
 
 CLASS
 
 
 INSTRUCTION
 COVEREDRATIO
 0.80
 
 
 
 
 
 
  
**/SocialMediaHelperImpl$WebsiteMetadata$Type.class
 
 
 
 
 report
 prepare-package
 
 report
 
 
 
${project.build.directory}/coverage.exec
 
 
 
 
 
 org.apache.maven.plugins
 maven-surefire-plugin
 
 
 
${project.build.directory}/coverage.exec
 
 
 

And we also use the agent:


 org.jacoco
 org.jacoco.agent
 ${jacoco.version}
 runtime
 test
  

Thanks,
Radu



--
Yo

Re: [java code coverage] Re: Test Coverage error?

2017-06-23 Thread Marc R. Hoffmann

Please see our documentation for a detailled discussion of this issue:

http://www.jacoco.org/jacoco/trunk/doc/classids.html

Regards,
-marc

On 23.06.17 08:46, abhay.iy...@gmail.com wrote:

debug="true" in the compile task did the trick in this case. Thanks.

I'm testing another project wherein I receive this warning during report 
creation:

[jacoco:report] Classes in bundle 'Test' do no match with execution data. For 
report generation the same class files must be used as at runtime.
[jacoco:report] Execution data for class com/**/AccountDetails does not match.

and the same warning for 3 more classes resulting in partial coverage details 
being copied to the report.


I googled it and found an answer on stack overflow suggesting that the versions 
used to compile the classes and create the report might be different.
I'm using a few external jars(Because of some dependencies). The .class files 
within these jars might have been compiled on 1.8.0_101 and I'm using 1.8.0_111
  
Originally I had tried it with 1.8.0_101 itself but I received the same error.

What might be the cause of this error?




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/347d6004-9c26-15fe-86b9-62cefbf16e3a%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: Test Coverage error?

2017-06-23 Thread Marc R. Hoffmann
Such example is included in the *documentation 
*:


http://www.jacoco.org/jacoco/trunk/doc/examples/build/build-offline.xml

Regards,
-marc

On 23.06.17 12:59, abhay.iy...@gmail.com wrote:

Hi,
Can someone please provide me with an example as to how to use the instrument 
task? Offline instrumentation seems to be the only workaround to the 
persistence framework being used.

What I've done:





Does the location of the instrumented classes(dest.dir) need to be included in 
both the coverage task and report creation task or only one of them?



  
 






  
<-- LOCATION OF INSTRUMENTED CLASSES
  

 








 



  






http://www.jacoco.org/jacoco/trunk/doc/offline.html
I read this page but I'm not entirely clear on where the jacocoagent.jar must 
be specified with respect to the coverage and report generation tasks and where 
the instrumented / original classes must be used.

Any additions to the code mentioned above are most welcome and very much 
appreciated. Thanks.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/17262f81-76db-b30c-db40-8bfb4f03d485%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: Test Coverage error?

2017-06-22 Thread Marc R. Hoffmann

Hi,

I think the FAQ  has an 
answer for you:



 Why does the coverage report not show line coverage figures?

   JaCoCo is based on class files analysis. To calculate line coverage
   class files must contain line number attributes. For this your code
   must be compiled with debug information.

Documentation also includes an Ant example 
 which 
shows how to properly configure the javac task for debug information.


Regards,
-marc



On 23.06.17 06:51, abhay.iy...@gmail.com wrote:

Okay so I had been compiling the .java files on command prompt via ant, it 
created the .class files and the report was generated which gave me the 
LINE_MISSED and LINE_COVERED as 0

Now, I compiled the classes in Eclipse itself and copied them to the point 
where ant starts creating the jar using the .class files.
Surprisingly, the file created now has the line numbers mentioned correctly.
  
Why is this happening?







 









 
 
 
 
 
  




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/bfcb2ec2-7ab1-ed2a-aa44-9671dca3c648%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] How to generate code coverage report when only binary of source is available

2017-06-21 Thread Marc R. Hoffmann

Hi,

it should be possible to create any report without source code. You 
simply get no source highlighting in the html report.


If this does not work for you, please provide a exact description of 
your setup.


Regards,
-marc

On 21.06.17 15:19, JococoUser wrote:


Hello

I have a scenario where I am just having binary ( no source code ) to 
run my integration tests on , using maven .

I want to generate code coverage report using jacoco .
Have searched through a lot , found examples when your source code is 
in different module than integration tests ( then use report-aggregate 
goal ) .
But haven't found anything related to when you don't have source code 
available and just the binary .
It should work as mentioned in Jacoco documentation -" Based on Java 
byte code and therefore works also without source files."


Please suggest !

Regards,
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/1fcf39fd-f1d9-4bb3-898a-0f2b52749c93%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/d108a325-5f2c-c344-a0fb-e1dc0b8117c3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] AspectJ around advice prevents coverage

2017-05-22 Thread Marc R. Hoffmann

Hi,

a workaround might be to use JaCoCo offline instrumentation before 
ApectJ is applied.


In general JaCoCo is fully based on Java class files. Due to this design 
choice the JaCoCo agent sees class exactly the way how they get 
executed. With offline instrumentation in some situation JaCoCo 
instrumentation can be applied before other tools modify the class files.


Regards,
-marc

On 19.05.17 20:38, bjk...@gmail.com wrote:

I have a project using build-time AspectJ to apply "around" advice to a method.  The AspectJ compiler 
renames/mangles the original method name (e.g., from "method" to "method_aroundBody0"), changes it 
to static and passes the instance var as the first parameter, adds the Synthetic class attribute, and creates a new 
method with the original name that does before/after logic and ultimately delegates to the new 
"method_aroundBody0" method.  Of course, the Synthetic class attribute means that JaCoCo ignores execution 
data for that method.

The behaviors of AspectJ and JaCoCo seem reasonable in isolation, but their 
interaction is unhelpful.  What can we do about this situation?  If the AspectJ 
compiler added metadata so JaCoCo could know that a method is renamed, would it 
be acceptable to read that metadata in the analyzer?  Other thoughts?



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/d4156256-7e5a-5d2a-bc43-616d0f0d5dc3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] How to save runtime code coverage data to cloud based storage

2017-05-16 Thread Marc R. Hoffmann

Glad to hear that at least the exec file issue got resolved!

Cheers,
-marc

On 16.05.17 23:23, yutian.song via JaCoCo and EclEmma Users wrote:

Hi Marc,

I got the valid data now! I think I got the issue, the previous trigger for 
getexecution data method is within a dependency module, because I didn't have 
the compiled lib file instrumented, the agent I got is from the dependent 
module. The ant task for report is configured to use the target module class 
file, so there is a mismatch in class file result in the invalid data file 
error. Issue gone when I put the trigger for dump data within the target module.

I think the current issue is gone but I still need to take a look on how to get 
the offline instrument working on the dependent module since we do have a lot 
of service depend on different other common module.

Thank you so much on the patient explanation and your weekend time!

Yutian Song

On Monday, May 15, 2017 at 11:12:09 AM UTC-7, Marc R. Hoffmann wrote:

Hi Yutian,

what value has data.length on the deployed app? Is it the exact length
you see later as the written exec file? Can you please post the new
version of your code which retrieves the execution data from the agent
and writes it as a GAE resource?

It is possible to dump the data content within the app Engine using
JaCoCo APIs, see this example:

http://www.jacoco.org/jacoco/trunk/doc/examples/java/ExecDump.java

Just wrap the data array with an ByteArrayInputStream instead of using a
FileInputStream.

But as said before: The problem in your case is the transport of the
data[] array to the server where you create the report.

Also I asked you to show the full stack trace (incl. "Caused By") so we
might see what is broken here.

Cheers,
-marc

On 15.05.17 19:48, yutian.song via JaCoCo and EclEmma Users wrote:

Hi Marc,

I have changed the code and tried the reflect to trigger dump too but the exec 
file keep 1.91KB in size and not readable. I think the size maybe tell 
something, we used to have the jacoco report, the exec file at least with 
300KB, the current one tells me that even the agent get data find the running 
jacoco agent but the data it return not match the one we plan to collect(by the 
ant instrument), I'm not sure is there anywhere I can use to track data in 
runtime like print something so I can quickly verify on it.

Regards,

Yutian Song

On Sunday, May 14, 2017 at 10:11:50 AM UTC-7, Marc R. Hoffmann wrote:

Hi,

first of all the ObjectOutputStrean must not be used. It might add some
headers which will definitely corrupt the exec file. Just write the data
to a plain OutputStream:

IAgent agent = RT.getAgent()
byte[] data = agent.getExecutionData(false)



OutputStream outStream = Channels.newOutputStream(outputChannel);
outStream.write(data);
outStream.close()

Regards,
-marc


On 14.05.17 19:03, yutian.song via JaCoCo and EclEmma Users wrote:

Hi Marc,

Thanks for your reply at weekend! Here is the code I used to send data to 
google cloud storage:
GcsService gcsService = 
GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance());
GcsFilename gcsFileName = new GcsFilename(bucketName, fileName);
GcsFileOptions.Builder fileOptionsBuilder = new 
GcsFileOptions.Builder();

GcsFileOptions fileOptions = fileOptionsBuilder.build();
GcsOutputChannel outputChannel = 
gcsService.createOrReplace(gcsFileName, fileOptions);
ObjectOutputStream outStream = new 
ObjectOutputStream(Channels.newOutputStream(outputChannel));
final ExecutionDataWriter writer = new 
ExecutionDataWriter(outStream);
log.info("start to write to GCS");
data.collect(writer, writer, reset);
log.info("finish write to gcs");

The lib for gcs is from maven central, google's release:
 
   
 com.google.appengine.tools
 appengine-gcs-client
 0.5
   
 

I don't know how to attach the data file here but it is only 2k in size which 
made me think I may not using it correctly, the although the getExecute data 
didn't send error message but the agent seems not start based on what I 
receive. I will try to use reflect method to see whether it is the cross module 
dump issue since the trigger to trigger the get data is in a dependency 
module's servlet.

Yutian Song

On Sunday, May 14, 2017 at 8:35:33 AM UTC-7, Marc R. Hoffmann wrote:

Hi Yutian,

the byte[] content is exactly what JaCoCo expects as an exec file.
Please double-check that you write the byte content as is, without any
modifications or additions. E.g. with standard Java APIs:

java.io.OutputStream.write(byte[])

Maybe you can show the snippet how you write the data?

Also the stacktrace should give some more details in "Caused by ..."
further down.

Regards,
-marc

On 14.05.17 00:36, yutian.song via JaCoCo and EclEmma Users wrote:

H

Re: [java code coverage] How to save runtime code coverage data to cloud based storage

2017-05-15 Thread Marc R. Hoffmann

Hi Yutian,

what value has data.length on the deployed app? Is it the exact length 
you see later as the written exec file? Can you please post the new 
version of your code which retrieves the execution data from the agent 
and writes it as a GAE resource?


It is possible to dump the data content within the app Engine using 
JaCoCo APIs, see this example:


http://www.jacoco.org/jacoco/trunk/doc/examples/java/ExecDump.java

Just wrap the data array with an ByteArrayInputStream instead of using a 
FileInputStream.


But as said before: The problem in your case is the transport of the 
data[] array to the server where you create the report.


Also I asked you to show the full stack trace (incl. "Caused By") so we 
might see what is broken here.


Cheers,
-marc

On 15.05.17 19:48, yutian.song via JaCoCo and EclEmma Users wrote:

Hi Marc,

I have changed the code and tried the reflect to trigger dump too but the exec 
file keep 1.91KB in size and not readable. I think the size maybe tell 
something, we used to have the jacoco report, the exec file at least with 
300KB, the current one tells me that even the agent get data find the running 
jacoco agent but the data it return not match the one we plan to collect(by the 
ant instrument), I'm not sure is there anywhere I can use to track data in 
runtime like print something so I can quickly verify on it.

Regards,

Yutian Song

On Sunday, May 14, 2017 at 10:11:50 AM UTC-7, Marc R. Hoffmann wrote:

Hi,

first of all the ObjectOutputStrean must not be used. It might add some
headers which will definitely corrupt the exec file. Just write the data
to a plain OutputStream:

IAgent agent = RT.getAgent()
byte[] data = agent.getExecutionData(false)



OutputStream outStream = Channels.newOutputStream(outputChannel);
outStream.write(data);
outStream.close()

Regards,
-marc


On 14.05.17 19:03, yutian.song via JaCoCo and EclEmma Users wrote:

Hi Marc,

Thanks for your reply at weekend! Here is the code I used to send data to 
google cloud storage:
GcsService gcsService = 
GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance());
GcsFilename gcsFileName = new GcsFilename(bucketName, fileName);
GcsFileOptions.Builder fileOptionsBuilder = new 
GcsFileOptions.Builder();

GcsFileOptions fileOptions = fileOptionsBuilder.build();
GcsOutputChannel outputChannel = 
gcsService.createOrReplace(gcsFileName, fileOptions);
ObjectOutputStream outStream = new 
ObjectOutputStream(Channels.newOutputStream(outputChannel));
final ExecutionDataWriter writer = new 
ExecutionDataWriter(outStream);
log.info("start to write to GCS");
data.collect(writer, writer, reset);
log.info("finish write to gcs");

The lib for gcs is from maven central, google's release:

  
com.google.appengine.tools
appengine-gcs-client
0.5
  


I don't know how to attach the data file here but it is only 2k in size which 
made me think I may not using it correctly, the although the getExecute data 
didn't send error message but the agent seems not start based on what I 
receive. I will try to use reflect method to see whether it is the cross module 
dump issue since the trigger to trigger the get data is in a dependency 
module's servlet.

Yutian Song

On Sunday, May 14, 2017 at 8:35:33 AM UTC-7, Marc R. Hoffmann wrote:

Hi Yutian,

the byte[] content is exactly what JaCoCo expects as an exec file.
Please double-check that you write the byte content as is, without any
modifications or additions. E.g. with standard Java APIs:

   java.io.OutputStream.write(byte[])

Maybe you can show the snippet how you write the data?

Also the stacktrace should give some more details in "Caused by ..."
further down.

Regards,
-marc

On 14.05.17 00:36, yutian.song via JaCoCo and EclEmma Users wrote:

Hi Marc,

Thanks for your suggestion! I tried the get executiondata and successfully run the 
offline instrument -> deploy to GAE -> collection data. I got the .exec file in 
the google cloud storage, but the:
Caused by: java.io.IOException: Invalid execution data file.
   at 
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:89)
   at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
   at org.jacoco.ant.ReportTask.loadExecutionData(ReportTask.java:514)
   ... 25 more
when I try to get the report from the exec file. This file is send through the 
google's api and I try to write the byte[] in the output stream and save as a 
.exec file. Not sure whether the invalid file is due to this byte[] to file 
save process. We used to try to save the coboertura data file by write the 
whole data object and it can parse after the donwload.

Yutian Song

On Thursday, May 11, 2017 at 10:53:42 PM UTC-

Re: [java code coverage] linux and windows abnormal

2017-05-15 Thread Marc R. Hoffmann

Hi,

can you please explain the exact differences you see between your 
windows and linux environment? Can you show a specific example what you 
mean by "to cover the information on the wrong"?


Otherwise it is pretty hard to guess what your problem might be.

Regards,
-marc

On 15.05.17 14:51, ruoyi1314...@gmail.com wrote:

Hi:

I use api own output coverage report,
E,g:

ExecFileLoader execFileLoader=new ExecFileLoader();
 execFileLoader.load(execfile);
CoverageBuilder coverageBuilder=new CoverageBuilder();
 Analyzer analyzer = new 
Analyzer(execFileLoader.getExecutionDataStore(), coverageBuilder);



but,Statistics on the windows above the coverage of information are normal,But 
deployed in the linux environment under the tomcat to cover the information on 
the wrong, the same exec file with the same src file


environment:Linux sjs_108_199 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/56eba5cb-c2c5-ce0b-535f-95086ec551f8%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Unable to install Eclemma in Eclipse v: Neon.3 Release (4.6.3)

2017-05-14 Thread Marc R. Hoffmann

Hi Joseph,

can you please try again? We had an issue with file permissions on the 
update site. Should be fixed now.


Sorry for the trouble,
-marc

On 15.05.17 04:34, Joseph Watts wrote:
Installing from both the Help > Eclipse Marketplace and Help > Install 
New Software has resulted in 'An error occured while collecting items 
to be installed.'


Both of the errors can be found below.

Installation from update site - http://update.eclemma.org/
http://i.imgur.com/SxpbKRG.png*

*Installation from Eclipse Marketplace
http://i.imgur.com/UQKA6Am.png

I'm not sure if it will make a difference, however, I am currently 
running Manjaro linux and have installed eclipse-common through pacman.

Thanks in advance!
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/4a686bbf-97d7-4fb8-8036-e01222f0b38f%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/2f0faa42-ec04-b7b5-c0d6-3d4bd84b057a%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] How to save runtime code coverage data to cloud based storage

2017-05-14 Thread Marc R. Hoffmann

Hi,

first of all the ObjectOutputStrean must not be used. It might add some 
headers which will definitely corrupt the exec file. Just write the data 
to a plain OutputStream:


IAgent agent = RT.getAgent()
byte[] data = agent.getExecutionData(false)



OutputStream outStream = Channels.newOutputStream(outputChannel);
outStream.write(data);
outStream.close()

Regards,
-marc


On 14.05.17 19:03, yutian.song via JaCoCo and EclEmma Users wrote:

Hi Marc,

Thanks for your reply at weekend! Here is the code I used to send data to 
google cloud storage:
GcsService gcsService = 
GcsServiceFactory.createGcsService(RetryParams.getDefaultInstance());
GcsFilename gcsFileName = new GcsFilename(bucketName, fileName);
GcsFileOptions.Builder fileOptionsBuilder = new 
GcsFileOptions.Builder();

GcsFileOptions fileOptions = fileOptionsBuilder.build();
GcsOutputChannel outputChannel = 
gcsService.createOrReplace(gcsFileName, fileOptions);
ObjectOutputStream outStream = new 
ObjectOutputStream(Channels.newOutputStream(outputChannel));
final ExecutionDataWriter writer = new 
ExecutionDataWriter(outStream);
log.info("start to write to GCS");
data.collect(writer, writer, reset);
log.info("finish write to gcs");

The lib for gcs is from maven central, google's release:
   
 
   com.google.appengine.tools
   appengine-gcs-client
   0.5
 
   

I don't know how to attach the data file here but it is only 2k in size which 
made me think I may not using it correctly, the although the getExecute data 
didn't send error message but the agent seems not start based on what I 
receive. I will try to use reflect method to see whether it is the cross module 
dump issue since the trigger to trigger the get data is in a dependency 
module's servlet.

Yutian Song

On Sunday, May 14, 2017 at 8:35:33 AM UTC-7, Marc R. Hoffmann wrote:

Hi Yutian,

the byte[] content is exactly what JaCoCo expects as an exec file.
Please double-check that you write the byte content as is, without any
modifications or additions. E.g. with standard Java APIs:

  java.io.OutputStream.write(byte[])

Maybe you can show the snippet how you write the data?

Also the stacktrace should give some more details in "Caused by ..."
further down.

Regards,
-marc

On 14.05.17 00:36, yutian.song via JaCoCo and EclEmma Users wrote:

Hi Marc,

Thanks for your suggestion! I tried the get executiondata and successfully run the 
offline instrument -> deploy to GAE -> collection data. I got the .exec file in 
the google cloud storage, but the:
Caused by: java.io.IOException: Invalid execution data file.
  at 
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:89)
  at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
  at org.jacoco.ant.ReportTask.loadExecutionData(ReportTask.java:514)
  ... 25 more
when I try to get the report from the exec file. This file is send through the 
google's api and I try to write the byte[] in the output stream and save as a 
.exec file. Not sure whether the invalid file is due to this byte[] to file 
save process. We used to try to save the coboertura data file by write the 
whole data object and it can parse after the donwload.

Yutian Song

On Thursday, May 11, 2017 at 10:53:42 PM UTC-7, Marc R. Hoffmann wrote:

Hi,

JaCoCo offers an runtime API for this:
http://www.jacoco.org/jacoco/trunk/doc/api/org/jacoco/agent/rt/package-summary.html

With

   byte[] execdata = RT.getAgent().getExecutionData(false);

you can get the execution data within the App engine and transfer/store
it by a apropriate mechanism.

If you get JaCoCo running with Goole AppEngine please let us know!

Regards,
-marc

On 12.05.17 02:57, yutian.song via JaCoCo and EclEmma Users wrote:

I'm working on a project to collect code coverage for end to end mode server 
side code. We used to use the cobertura to achieve this but interested in 
transfer to Jacoco.

Our service is running on the Google appengine which bring us a lot of trouble 
like no file read/write allowed, no socket server allowed. These limitation 
makes it has only one solution to read  the test result file is through 
Google's cloud platform storage. Something like we send the code coverage data 
in byte array to somewhere. Cobertura github wiki provide a java reflect method 
that collect data and we try to using servlet to trigger this collection and 
data transmission.

Google appengine not allow using java agent force us to use the offline 
instrument. I just tried the ant task for Jacoco and got the instrumented 
classes but wonder if there is similar thing we could do to trigger data 
collection and transmission in servlet with Jacoco.



--
You received this message because you are subscribed to the Google G

Re: [java code coverage] How to save runtime code coverage data to cloud based storage

2017-05-14 Thread Marc R. Hoffmann

Hi Yutian,

the byte[] content is exactly what JaCoCo expects as an exec file. 
Please double-check that you write the byte content as is, without any 
modifications or additions. E.g. with standard Java APIs:


java.io.OutputStream.write(byte[])

Maybe you can show the snippet how you write the data?

Also the stacktrace should give some more details in "Caused by ..." 
further down.


Regards,
-marc

On 14.05.17 00:36, yutian.song via JaCoCo and EclEmma Users wrote:

Hi Marc,

Thanks for your suggestion! I tried the get executiondata and successfully run the 
offline instrument -> deploy to GAE -> collection data. I got the .exec file in 
the google cloud storage, but the:
Caused by: java.io.IOException: Invalid execution data file.
 at 
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:89)
 at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
 at org.jacoco.ant.ReportTask.loadExecutionData(ReportTask.java:514)
 ... 25 more
when I try to get the report from the exec file. This file is send through the 
google's api and I try to write the byte[] in the output stream and save as a 
.exec file. Not sure whether the invalid file is due to this byte[] to file 
save process. We used to try to save the coboertura data file by write the 
whole data object and it can parse after the donwload.

Yutian Song

On Thursday, May 11, 2017 at 10:53:42 PM UTC-7, Marc R. Hoffmann wrote:

Hi,

JaCoCo offers an runtime API for this:
http://www.jacoco.org/jacoco/trunk/doc/api/org/jacoco/agent/rt/package-summary.html

With

  byte[] execdata = RT.getAgent().getExecutionData(false);

you can get the execution data within the App engine and transfer/store
it by a apropriate mechanism.

If you get JaCoCo running with Goole AppEngine please let us know!

Regards,
-marc

On 12.05.17 02:57, yutian.song via JaCoCo and EclEmma Users wrote:

I'm working on a project to collect code coverage for end to end mode server 
side code. We used to use the cobertura to achieve this but interested in 
transfer to Jacoco.

Our service is running on the Google appengine which bring us a lot of trouble 
like no file read/write allowed, no socket server allowed. These limitation 
makes it has only one solution to read  the test result file is through 
Google's cloud platform storage. Something like we send the code coverage data 
in byte array to somewhere. Cobertura github wiki provide a java reflect method 
that collect data and we try to using servlet to trigger this collection and 
data transmission.

Google appengine not allow using java agent force us to use the offline 
instrument. I just tried the ant task for Jacoco and got the instrumented 
classes but wonder if there is similar thing we could do to trigger data 
collection and transmission in servlet with Jacoco.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/878f7e8a-65f4-25a0-add6-331bae135719%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] How to save runtime code coverage data to cloud based storage

2017-05-11 Thread Marc R. Hoffmann

Hi,

JaCoCo offers an runtime API for this: 
http://www.jacoco.org/jacoco/trunk/doc/api/org/jacoco/agent/rt/package-summary.html


With

byte[] execdata = RT.getAgent().getExecutionData(false);

you can get the execution data within the App engine and transfer/store 
it by a apropriate mechanism.


If you get JaCoCo running with Goole AppEngine please let us know!

Regards,
-marc

On 12.05.17 02:57, yutian.song via JaCoCo and EclEmma Users wrote:

I'm working on a project to collect code coverage for end to end mode server 
side code. We used to use the cobertura to achieve this but interested in 
transfer to Jacoco.

Our service is running on the Google appengine which bring us a lot of trouble 
like no file read/write allowed, no socket server allowed. These limitation 
makes it has only one solution to read  the test result file is through 
Google's cloud platform storage. Something like we send the code coverage data 
in byte array to somewhere. Cobertura github wiki provide a java reflect method 
that collect data and we try to using servlet to trigger this collection and 
data transmission.

Google appengine not allow using java agent force us to use the offline 
instrument. I just tried the ant task for Jacoco and got the instrumented 
classes but wonder if there is similar thing we could do to trigger data 
collection and transmission in servlet with Jacoco.




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/5a0a5912-b6de-d78b-692d-6f4d05203884%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Generate report from merged jacoco exec files

2017-05-08 Thread Marc R. Hoffmann

Hi,

exec files are basically plain arrays of boolean probes. Beside the name 
and hash they do not contain any information about the corresponding 
class files. During report generation the original class files are used 
to analyze the control flow and calculate coverage for lines, methods 
and so on.


Therefore JaCoCo always requires class files to generate reports. Source 
files are optional, but without them you don't get source highlighting 
in the HTML report of course.


Regards,
-marc

On 09.05.17 01:05, gmparker2...@gmail.com wrote:

That makes sense.  I was hoping that there was a way to generate a report using 
just the jacoco.exec file.  The project that is generating the report is not 
part of multi module project.  During the multi-module build, individual 
jacoco.exec files are created.  Later, the report project is built and a jacoco 
merge takes place to build a merged jacoco.exec file.  Then I was trying to run 
the report on the merged jacoco.exec file.  Can this be done?  Does the report 
process need class files, source files, etc etc?  Or is the execution data 
enough?



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/0df9cb36-fe81-b58c-98db-20770b9033dc%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Generate report from merged jacoco exec files

2017-05-08 Thread Marc R. Hoffmann

Hi,

hard to tell what's going wrong here as you only show snippets. In our 
test suite you find a working example:


https://github.com/jacoco/jacoco/tree/master/jacoco-maven-plugin.test/it/it-report-aggregate

Does you reporting pom declare dependencies on on the projects which 
should be included? " The report is created from all modules this 
project depends on". See documentation:


http://www.jacoco.org/jacoco/trunk/doc/report-aggregate-mojo.html

Regards,
-marc

On 08.05.17 21:04, gmparker2...@gmail.com wrote:

Hoping someone can help me out.  I have the following in my reactor pom :

 
 org.apache.maven.plugins
 maven-surefire-plugin
 2.19.1
 
 ${surefireArgLine} -Xms256m -Xmx2048m
 1
 random
 true
 
 
 
 

 org.jacoco
 jacoco-maven-plugin
 0.7.9
 
 surefireArgLine
 
 
 
 prepare-agent
 
 prepare-agent
 
 
 
 


In a seperate reporting pom I have this:

 
 


 org.jacoco
 jacoco-maven-plugin
 0.7.9
 true
 
 
 
 report-aggregate
 
 
 
 
 
 

 

 
 
 org.jacoco
 jacoco-maven-plugin
 0.7.9
 true
 
 
 verify
 
 merge
 
 
 
 
 ${project.build.directory}/jacoco.exec
 
   
 ${basedir}/..
 
   **/target/*.exec
 
   
 
 
 
 
 

So the idea is that I build my multi-module project which generates multiple 
jacoco.exec files.  Then I execute a build on the reporting project to merge 
the individual jacoco.exec files and executes a report.  The individual 
jacoco.exec files all work and have data.  The merge seems to work as well but 
the final report has nothing.  Is everything that the jacoco reporting plugin 
requires in the jacoco.exec file or does it require jar files/classes as well?

  



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/426ddf27-9556-fc14-de48-4d4f50a20c9f%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: Error Creating Report

2017-05-04 Thread Marc R. Hoffmann

Hi,

the stack trace points out the problem:

"Class HelloWorld is already instrumented."

Report generation cannot work on instrumented classes. You need to 
supply the original classes.


Regards,
-marc

On 04.05.17 20:16, 'Stanley Chong' via JaCoCo and EclEmma Users wrote:

Sorry about the time in between.  here is part of the stack trace:

BUILD FAILED

/home/s_mrscha/bld24/build.xml:25:Error while creating report

at org.jacoco.ant.ReportTask.execute(ReportTask.java:501)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)

….

….

Caused by: java.io.IOException: Error while analyzing HelloWorld.class.

at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:153)

at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:147)

at org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:178)

…

…

…

Caused by: java.lang.IllegalStateException: Class HelloWorld is 
already instrumented.


At 
org.jacoco.core.internal.instr.InstrSupport.assertNotInstrumented(InstrSupport.java:94)


…

…

… 21 more


On Tuesday, April 18, 2017 at 1:45:26 PM UTC-4, Stanley Chong wrote:

Hi,
We are trying to use JaCoCo on a Java program that is compiled to
machine code.  We can get the jacoco.exec to be created, but when
we try to generate the report, we get the following error:

Buildfile: build.xml

Report:

[jacoco:report] Loading execution data file
/home/s_mrscha/bld24/jacoco.exec

BUILD FAILED

/home/s_mrscha/bld24/build.xml:23: Error while creating report

Total time: 6 seconds


And line 23 is just the first line of the ant 
task… so that doesn’t seem to be useful.


Is there something else that would enable us to see a more
descriptive error so we can fix this problem?


Thanks,

Stan



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/33a62cc0-e4a4-56a6-ab31-3f09dde76bbe%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Code coverage of a dependent library in service coverage report

2017-04-03 Thread Marc R. Hoffmann

Hi,

in theory all of this is possible with JaCoCo. The question is whether 
this works out of the box with exiting integrations.


How do you create your coverage report? With Maven? In this case we have 
an enhancement request pending:


https://github.com/jacoco/jacoco/issues/404

Regards,
-marc

On 03.04.17 13:58, atulagrawal.d...@gmail.com wrote:

Hi All,

I have a service which uses 4-5 separately developed libraries. As of now, we 
can get code coverage of service using JOCoCo but now we also want to include 
the coverage of dependent libraries in the coverage report.

Is it possible to do it? If yes then any reference for the same would be really 
helpful.

Also, is it possible to consolidate the coverage report of these dependent 
libraries across multiple services?


Thanks in advance.




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/9427464d-7a71-9f78-0820-a039d15e7f65%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] [jacoco:dump] connecting to /xxx.xx.xx.xxx:6300 [jacoco:dump]Connection refused :connect

2017-03-31 Thread Marc R. Hoffmann

Hi,


-javaagent:/test/jacoco/jacocoagent.jar=output=tcpserver,address="remoteAddress"


this will not work. For address you need to specify a local interface of 
the server, or * to bind to all interfaces.


Regards,
-marc



On 31.03.17 18:36, beingjitutiw...@gmail.com wrote:

On Thursday, March 30, 2017 at 1:19:36 AM UTC-5, Marc R. Hoffmann wrote:

Hi,

   


   how did you configure the JaCoCo agent on the server? By default
   it only binds to the loopback interface only and is therefore not
   accessible from remote hosts. To bind to all hosts you need to
   configure address=* for the agent. See documentation:

   

   
   
 
   
 address

 IP address or hostname to bind to when the output method
   is tcpserver or connect to when the output
   method is tcpclient. In tcpserver
   mode the value "*" causes the agent to accept
   connections on any local address.
 loopback interface
   
 
   
   


   http://www.jacoco.org/jacoco/trunk/doc/agent.html

   


   With netstat -a you can verify to which interface the agent
   actually binds (look for lines with "LISTEN").

   


   Regards,

   -marc

   

   


   On 30.03.17 04:56, beingji...@gmail.com wrote:

 
 
   Hi,

   I need a urgent to generate jacoco remote by accessing a server running 
remotely. Somehow, I can access that server without authentication. I am trying 
jacoco on the fly instrumentation (output=tcpserver) and trying to dump 
instrumented  data by running a ant task from local machine. Please see be 
build.xml. Somehow I am not able to connect remote server.

I would highly appreciate any help regarding that.




 
 

 
   
 


 
   
 




Thanks Marc,

Please see below jacoco agent configuration:

-javaagent:/test/jacoco/jacocoagent.jar=output=tcpserver,address="remoteAddress"

Ant task:


   
 

My remote server require authentication and so I can not use ant task. As per 
documentation jacoco does not provide any authentication mechanisms. So I tried 
with jacoco java API ExecutionDataClient, I am able to run and dump 
instrumented data for local server. Now I am trying the same for remote sever. 
Can you please suggest about that.

Thanks.
Jitendra Tiwari




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/02bc217d-0973-1cc4-4c11-328ef1146ae9%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] [jacoco:dump] connecting to /xxx.xx.xx.xxx:6300 [jacoco:dump]Connection refused :connect

2017-03-29 Thread Marc R. Hoffmann

Hi,

how did you configure the JaCoCo agent on the server? By default it only 
binds to the loopback interface only and is therefore not accessible 
from remote hosts. To bind to all hosts you need to configure address=* 
for the agent. See documentation:


|address| 	IP address or hostname to bind to when the output method is 
|tcpserver| or connect to when the output method is |tcpclient|. In 
|tcpserver| mode the value "|*|" causes the agent to accept connections 
on any local address. 	/loopback interface/



http://www.jacoco.org/jacoco/trunk/doc/agent.html

With netstat -a you can verify to which interface the agent actually 
binds (look for lines with "LISTEN").


Regards,
-marc


On 30.03.17 04:56, beingjitutiw...@gmail.com wrote:

Hi,
   I need a urgent to generate jacoco remote by accessing a server running 
remotely. Somehow, I can access that server without authentication. I am trying 
jacoco on the fly instrumentation (output=tcpserver) and trying to dump 
instrumented  data by running a ant task from local machine. Please see be 
build.xml. Somehow I am not able to connect remote server.

I would highly appreciate any help regarding that.




 
 

 
   
 


 
   
 







--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/614b00f8-8cc4-c831-a081-598e667c9ba3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Why isn't short-circuiting taken into account in branch count

2017-03-28 Thread Marc R. Hoffmann

Hi,

the short circuit results in two separate branching points each 
containing two branches, so 2+2=4.


You can rewrite the line as

if (0 <= i) if (i < 10)

This is how short circuits expressions get compiled and how JaCoCo sees it.

Regards,
-marc

On 28.03.17 05:04, cmb...@case.edu wrote:

Hi,

I have a condition that looks something like this:
if(0 <= i && i < 10)

The coverage report shows 1 of 4 branches missed. I can't expect JaCoCo to 
recognize the semantics of the condition which make it impossible to reach the 
fourth branch (i can't be both less than 0 and greater than 10), but why 
doesn't it just count 3 branches? Thanks to short-circuiting, if the first 
decision is false, it shouldn't matter what the second one is.


Thanks,
Cassidy




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/14b991db-d6af-8871-0e8a-2242751017f1%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] jacoco test reports are cleared

2017-03-15 Thread Marc R. Hoffmann

Hi,

this is exactly how JaCoCo works: coverage data of different versions of 
a class cannot be merged.


Regards,
-marc

On 15.03.17 10:46, yezis...@gmail.com wrote:

Hi!

I am using the Jacoco Agent with tomcat to get my test reports and I have got a 
problem.
when I change some java src and restart tomcat server, next time I get my 
Jacoco test reports ,the coverage rate of class which I have changed before are 
cleared.

Is there any way can help to solve my problem?

Thanks.




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/17056045-3f49-cb67-1bd8-70afb85828c9%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Where is it explained exactly what columns are viewable in the JaCoCo HTML report?

2017-02-27 Thread Marc R. Hoffmann

Hi,

over the time our HTML report got so many features that it deserves its 
own documentation page. I started an outline here:


https://github.com/jacoco/jacoco/wiki/HtmlCoverageReport

Once the text is finished I'll move it to the source tree.

Cheers,
-marc


On 27.02.17 19:22, David Karr wrote:

On Monday, February 27, 2017 at 8:28:56 AM UTC-8, Evgeny Mandrikov wrote:


On Monday, February 27, 2017 at 5:18:31 PM UTC+1, David Karr wrote:

tooltips won't be seen unless you hover the mouse over the
column header


Tooltips are not a bad idea.
But I saw people, who are not able to find tooltips, in exactly
the same way as you overlooked missing column separators :) and
they anyway will ask question :)
Addition of a help icon and link to help page? Also not sure,
because believe that usually "Sessions" page (link is in right top
corner) is overlooked.


Some people are just hopeless :) .  Seriously, tooltips are something 
that many people think to check for, and many others who discover them 
accidentally.  It's just a way to provide additional information that 
doesn't get in the way of experienced users.


Concerning the "Sessions" page, I would imagine it's mostly overlooked 
because most people don't have a clue what it's for.  I don't know 
what it's for.  Don't consider that a request to explain it here, I'm 
just pointing that out to give you some perspective. I would imagine 
the vast majority of people who deliberately navigate to this page 
will understand what "line coverage" is.  Somewhat fewer will 
understand "branch coverage", hardly any will understand "complexity 
coverage" (I still don't), and most will never even notice the 
"Sessions" link or know what it's for.  Look at this page from that 
perspective, and you'll see the value of providing informational 
tooltips on some of those headers and links. I think you already see 
it, just providing more emphasis. As developers of a framework or 
application, we often don't have the perspective of ordinary users.

--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/93ea0e8d-f7d2-4905-9076-22bb5acf45d6%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/c48c9ff0-d7c2-0a58-58b7-87ba4b143074%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Where is it explained exactly what columns are viewable in the JaCoCo HTML report?

2017-02-27 Thread Marc R. Hoffmann

Hi David,

the columns are grouped (see vertical lines). For complexity, lines, 
methods and classes the number of missed items and the number of total 
items is shown.


* Element: Clear
* Missed Instructions: Clear
* Cov.: Instruction coverage
* Missed Branches: Clear
* Cov.: Branch coverage
* Missed: No idea. --> Missed complexity
* Cxty: Cyclomatic complexity? --> Yep
* Missed: Missed lines?  --> Yep
* Lines: Count of lines? --> Total count
* Missed: Missed methods? --> Yep
* Methods: Count of methods? --> Total count
* Missed: Missed classes? --> Yep
* Classes: Class count? --> Total count

The exact definition of the counters are described in documentation 
.


I agree that the headers are quite minimalistic. I selected the format 
for the sake of a compact rendering many years ago. I like the more 
compact format and would leave it like it is. Maybe an alternative would 
be to add tool tips?


I have a unfinished pull request 
 to cutomize columns. This 
would also allow users to write longer, more descriptive headers. Would 
that help in your case?


Cheers,
-marc




On 26.02.17 23:25, David Karr wrote:
Looking at the generated HTML table, I'm now not certain I know 
exactly what each of these columns represents.  I tried searching 
through the documentation, but I found nothing. There are also no 
obvious tooltips to provide additional information.


Some of the columns are obvious, and many of them I can make educated 
guesses for, but this seems like something that could be improved.


I currently see the following headers:

* Element: Clear
* Missed Instructions: Clear
* Cov.: Instruction coverage
* Missed Branches: Clear
* Cov.: Branch coverage
* Missed: No idea.
* Cxty: Cyclomatic complexity?
* Missed: Missed lines?
* Lines: Count of lines?
* Missed: Missed methods?
* Methods: Count of methods?
* Missed: Missed classes?
* Classes: Class count?

I suppose I could dig into the source to figure this out (which I may 
do for a PR for this), but could someone state authoritatively what 
these all mean?


--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/a8d65cfc-f2ab-453a-b640-7ce84f3170f6%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/7d0b17ef-3a48-be72-0fec-5ac2dfb05b61%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Wrong return type in function error

2017-02-27 Thread Marc R. Hoffmann

Hello,

this looks like there is an issue with different ASM versions -- which 
really shouldn't happen. To investigate this can you please provide the 
following information:


1) Full stack trace from the Eclipse log file (from .log file from 
/.metadata)
2) Complete plugin version list (from About --> Installation Details --> 
Configuration --> Sections "Features" and "Plug-in Registry")


Thanks,
-marc


On 27.02.17 05:51, xploreraj wrote:

Hi,

I ran an FT with Coverage As-> TestNG, but its executing the test and returning below 
error An internal error occurred during: "Analyzing coverage session 
com.mycomp.rest.raj.MessageTest.operate (Feb 27, 2017 10:04:32 AM)". (class: 
org/jacoco/core/internal/flow/ClassProbesAdapter, method: visitMethod signature: 
(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Lja‌​va/lang/String;)Lorg‌​/objectweb/asm/Metho‌​dVisitor;)
 Wrong return type in function.

How to resolve this?

EclEmma - 2.3.3
Eclipse -   Eclipse IDE for Java EE Developers  4.5.1.20150917-1200 
epp.package.jee

Thanks




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/22e31e10-77ca-6a86-5a2e-4075c6d205b6%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco throws errors when method body is very large.

2017-02-09 Thread Marc R. Hoffmann

Hi,

please as a first step update to our latest release 0.7.9. This release 
contains a fix specifically for large methods.


If the problem persists, please provide the full stack trace of exception.

Regards,
-marc

On 09.02.17 21:16, rahul.s.rath...@gmail.com wrote:

I am successfully using Jacoco except one issue. Jacoco throws errors when 
method body is very large. Is there any limitation on number of lines in a 
method? If yes can we increase that limit? Unfortunately, there are so many 
such methods in my project and splitting them is a big and tedious task.

So I am looking for any alternate solution. Any help would be highly 
appreciated.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/bc44ef5f-eb8c-3278-3503-6bea82bcedbe%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco agent in tcpclient mode inside a docker container?

2017-02-06 Thread Marc R. Hoffmann

Hi Revanth,

please try to terminate the JVM properly first before you shutdown the 
container.


Regards,
-marc

On 07.02.17 01:27, p.reva...@gmail.com wrote:

Hello,

I am setting up a code coverage for my project which follows a micro service 
architecture with services deployed as docker containers. I have setup an 
individual docker container running  ExecutionDataServer from the examples. Now 
my dilemma is how to make the jacoco agent running in tcpclient mode publish to 
this server.

As far as I understand that jvm has to get terminated so that the execution 
data is dumped. I tried several ways of shutting down the docker containers but 
I do not see any data getting written to the server. Any insights into this is 
appreciated.


Following is the configuration in each of the microservices

-javaagent:/lib/org.jacoco.agent-0.7.8runtime.jar=output=tcpclient,address=jacocoserver,port=6300


address attribute is the hostname of the container running ExecutionDataServer.

Thanks,
Revanth.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/01ce77a5-952c-458c-5cea-dcd8010d32d3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] JBoss Wildfly 10.1.0 fails to start if jacoco agent is attached and jmx=true

2017-02-06 Thread Marc R. Hoffmann

Hi Vesa,

hi, this is all what happens when the jmx is activated:

https://github.com/jacoco/jacoco/blob/master/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/JmxRegistration.java

I don't see any relation to logging. Is there any additional output or 
other logfiles (e.g. on stdout)?


Regards,
-marc



On 06.02.17 10:45, vesa.luom...@gmail.com wrote:

Hi!

I have following startup failure from JBoss Wildfly 10.1.0 if JaCoCo agent is 
attached and jmx-option is set to true. Everything works well if jmx=false. No 
other options than JaCoCo agent option is addded to JBoss. Any idea what might 
cause this? It looks like jmx setting causes JaCoCo to interfere with logging 
settings

Br,

+Vesa

[wildfly@developer log]$ WARNING: Failed to load the specified log manager 
class org.jboss.logmanager.LogManager
Feb 06, 2017 11:43:57 AM org.jboss.msc.service.ServiceContainerImpl 
INFO: JBoss MSC version 1.2.6.Final
Feb 06, 2017 11:43:58 AM org.jboss.as.server.ApplicationServerService start
INFO: WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
Feb 06, 2017 11:44:09 AM org.jboss.as.controller.AbstractOperationContext 
executeStep
ERROR: WFLYCTL0013: Operation ("parallel-extension-add") failed - address: ([])
java.lang.RuntimeException: WFLYCTL0079: Failed initializing module 
org.jboss.as.logging
at 
org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:115)
at 
org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:890)
at 
org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:659)
at 
org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:370)
at 
org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1329)
at 
org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:467)
at 
org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:387)
at 
org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:349)
at org.jboss.as.server.ServerService.boot(ServerService.java:397)
at org.jboss.as.server.ServerService.boot(ServerService.java:366)
at 
org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:299)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: WFLYLOG0078: 
The logging subsystem requires the log manager to be org.jboss.logmanager.LogManager. The subsystem 
has not be initialized and cannot be used. To use JBoss Log Manager you must add the system 
property "java.util.logging.manager" and set it to 
"org.jboss.logmanager.LogManager"
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at 
org.jboss.as.controller.extension.ParallelExtensionAddHandler$1.execute(ParallelExtensionAddHandler.java:107)
... 11 more
Caused by: java.lang.IllegalStateException: WFLYLOG0078: The logging subsystem requires the log 
manager to be org.jboss.logmanager.LogManager. The subsystem has not be initialized and cannot be 
used. To use JBoss Log Manager you must add the system property 
"java.util.logging.manager" and set it to "org.jboss.logmanager.LogManager"
at 
org.jboss.as.logging.LoggingExtension.initialize(LoggingExtension.java:147)
at 
org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:131)
at 
org.jboss.as.controller.extension.ExtensionAddHandler.initializeExtension(ExtensionAddHandler.java:104)
at 
org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:144)
at 
org.jboss.as.controller.extension.ParallelExtensionAddHandler$ExtensionInitializeTask.call(ParallelExtensionAddHandler.java:127)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)

Feb 06, 2017 11:44:09 AM org.jboss.as.server.ServerService$4 logExit
FATAL: WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. 
See previous messages for details.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/1de6c793-e6cb-ae1c-e10b-ecf78

Re: [java code coverage] JaCoCo Gradle no subproject coverage

2017-02-02 Thread Marc R. Hoffmann

Hi,

the Gradle plug-in is not maintained by us, but by the Gradle project. I 
recommend to get in touch with them for support.


Regards,
-marc

On 02.02.17 11:00, bensmit...@gmail.com wrote:

I've been using JaCoCo via the Gradle plugin and it's been working well, but 
I've just moved some of my code base into subprojects and I'm no longer getting 
coverage.

The JaCoCo agent generates the exec file correctly.
The report is also generated and sessions page has the classes from the sub 
project, but there is no coverage in the main coverage page.

I've written an SSCCE for the problem:

├── build.gradle
├── settings.gradle
├── src
│   └── cucumber
│   ├── java
│   │   └── a
│   │   └── Steps.java
│   └── resources
│   └── test.feature
└── sub
 └── src
 └── main
 └── java
 └── a
 └── Sub.java

build.gradle

plugins {
 id 'java'
 id 'jacoco'
 id 'com.github.samueltbrown.cucumber' version '0.9'
}

repositories {
 mavenCentral()
}

cucumber {
 glueDirs = ['src/cucumber/java']
 featureDirs = ['src/cucumber/resources']

 jvmOptions {
 def jacocoAgent = 
zipTree(configurations.jacocoAgent.singleFile).filter { it.name == 
'jacocoagent.jar' }.singleFile
 def jacocoResult = "$buildDir/results/jacoco/cucumber.exec"
 jvmArgs = 
["-javaagent:$jacocoAgent=destfile=$jacocoResult,append=false"]
 }
}

jacocoTestReport {
 executionData = files("$buildDir/results/jacoco/cucumber.exec")

 reports {
 html.destination "$buildDir/reports/jacoco"
 }
}

dependencies {
 cucumberCompile 'info.cukes:cucumber-java:1.2.5'
 cucumberCompile project('sub')
}

subprojects {
 apply plugin: 'java'
}

I've tried playing with the properties of the jacocoTestReport task, but 
nothing seems to help.

I'm running on Arch linux with OpenJDK 8 and Gradle 3.3.

I find JaCoCo indispensable for creating quality software and would greatly 
appreciate any help.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/642e47aa-006c-caff-e1f1-4d08100fc56c%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


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

2017-01-26 Thread Marc R. Hoffmann

Hi Mirko,

first of all: Nice to see you back here :-)

This seems to be an issue with the Kotlin compiler. The compiled class 
file AppKt has a reference to line 18 in method outer(). See decmpiled 
version below. JaCoCo simply takes this debug line information from the 
class file.


Cheers,
-marc




Classfile 
/Users/marc/git/jacoco-kotlin-sample/target/classes/de/friedenhagen/jacocokotlinsample/AppKt.class

  Last modified 26.01.2017; size 1107 bytes
  MD5 checksum 5f18406d76db819836b94e2d5a6193df
  Compiled from "App.kt"
public final class de.friedenhagen.jacocokotlinsample.AppKt
  SourceFile: "App.kt"
  SourceDebugExtension:
SMAP
App.kt
Kotlin
*S Kotlin
*F
+ 1 App.kt
de/friedenhagen/jacocokotlinsample/AppKt
+ 2 IntrinsicArrayConstructors.kt
org/jetbrains/kotlin/codegen/intrinsics/IntrinsicArrayConstructorsKt
*L
1#1,17:1
39#2:18
*E
*S KotlinDebug
*F
+ 1 App.kt
de/friedenhagen/jacocokotlinsample/AppKt
*L
16#1:18
*E
  RuntimeVisibleAnnotations:
0: 
#26(#27=[I#28,I#28,I#28],#29=[I#28,I#30,I#30],#31=I#32,#33=[s#34],#35=[s#5,s#36,s#37])

  minor version: 0
  major version: 50
  flags: ACC_PUBLIC, ACC_FINAL, ACC_SUPER
Constant pool:
   #1 = Utf8 de/friedenhagen/jacocokotlinsample/AppKt
   #2 = Class  #1 // 
de/friedenhagen/jacocokotlinsample/AppKt

   #3 = Utf8   java/lang/Object
   #4 = Class  #3 //  java/lang/Object
   #5 = Utf8   outer
   #6 = Utf8   ()V
   #7 = Utf8   de/friedenhagen/jacocokotlinsample/App
   #8 = Class  #7 // 
de/friedenhagen/jacocokotlinsample/App

   #9 = Utf8   Companion
  #10 = Utf8 Lde/friedenhagen/jacocokotlinsample/App$Companion;
  #11 = NameAndType#9:#10 // 
Companion:Lde/friedenhagen/jacocokotlinsample/App$Companion;
  #12 = Fieldref   #8.#11 // 
de/friedenhagen/jacocokotlinsample/App.Companion:Lde/friedenhagen/jacocokotlinsample/App$Companion;

  #13 = Utf8   java/lang/String
  #14 = Class  #13//  java/lang/String
  #15 = Utf8   [Ljava/lang/Object;
  #16 = Class  #15// "[Ljava/lang/Object;"
  #17 = Utf8   [Ljava/lang/String;
  #18 = Class  #17// "[Ljava/lang/String;"
  #19 = Utf8 de/friedenhagen/jacocokotlinsample/App$Companion
  #20 = Class  #19// 
de/friedenhagen/jacocokotlinsample/App$Companion

  #21 = Utf8   main
  #22 = Utf8   ([Ljava/lang/String;)V
  #23 = NameAndType#21:#22// main:([Ljava/lang/String;)V
  #24 = Methodref  #20.#23// 
de/friedenhagen/jacocokotlinsample/App$Companion.main:([Ljava/lang/String;)V

  #25 = Utf8   elements$iv
  #26 = Utf8   Lkotlin/Metadata;
  #27 = Utf8   mv
  #28 = Integer1
  #29 = Utf8   bv
  #30 = Integer0
  #31 = Utf8   k
  #32 = Integer2
  #33 = Utf8   d1
  #34 = Utf8

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/13e7fb57-0c08-4800-d173-7947387f7453%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] jacoco lost some coverage

2017-01-23 Thread Marc R. Hoffmann

Hi,

on the top right corner of the HTML report there is a link "sessions". 
On that page:


1) Is the your class TaskBusiness listed?
2) Does the TaskBusiness entry have a html link on the sessions page?

Also check your maven build output: Is there any message from the report 
goal?


Cheers,
-marc

On 24.01.17 04:02, felix19822...@gmail.com wrote:

JaCoCo version:0.7.8
Operating system:linux
Tool integration: Maven+jacoco agent

I use jacoco agent to dump exec file,then use maven-plugin generate report

  @Override
 public GetCTaskTreeTypeResponse getCTaskTreeType(GetCTaskTreeRequest 
request) throws Exception {
 GetCTaskTreeTypeResponse responseType = new GetCTaskTreeTypeResponse();
 ResponseStatusType responseStatusType = new ResponseStatusType();

 try {
 responseType = TaskBusiness.getCTaskTreeType(request);
 responseStatusType.setAck(AckCodeType.Success);

In this class, TaskBusiness.getCTaskTreeType(request) is covered ,but 
TaskBusiness's coverage is 0%.

Element Missed Instructions Cov.Missed Branches Cov.Missed  Cxty
Missed  Lines   Missed  Methods Missed  Classes
Total   5,201 of 5,201  0%  662 of 662  0%  365 365 877 
877 28  28  1   1
TaskBusiness5,201   0%  662 0%  365 365 877 877 
28  28  1   




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/4c769239-a6f7-4e98-2432-16c4a68f731d%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Is there example code for loading a JaCoCo report XML file?

2017-01-16 Thread Marc R. Hoffmann

Hi Mark,

there is nothing specific about this XML file. There are at least two 
basic xml parsing APIs in the JDK you could use:


 * https://docs.oracle.com/javase/tutorial/jaxp/sax/index.html
 * https://docs.oracle.com/javase/tutorial/jaxp/dom/index.html

As the report files can get really big I would recommend using the 
event-driven SAX API and store exactly the information you need.


Regards,
-marc

On 16.01.17 22:26, mark.vallev...@unisys.com wrote:

I might need to process a JaCoCo report XML file to get the metrics that we 
need.

Is there any example code for loading a JaCoCo report XML file?
Java, of course.  But, anything is welcome.

I could start with the ReportGenerator.java example, but the source being 
analyzed might not be present when I need to run the program.  The XML report 
will be available when the program needs to run.

Again, anything is welcome.

Regards.
Mark K Vallevand



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/bceed3e7-a969-0ef2-c30c-8813188c7899%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] [Jacoco] how to change the charset of html's report file?

2017-01-10 Thread Marc R. Hoffmann

Hi,

you can specify the encoding of the source files as well as the encoding 
of the html report e.g. with our Ant tasks:


http://www.jacoco.org/jacoco/trunk/doc/ant.html

I don't think I fully understand your question, but UTF-8 as for the 
html output should work for japanese characters. Maybe there is an issue 
with the source file encoding on the input side?


Regards,
-marc

On 10.01.17 20:53, tiendungva...@gmail.com wrote:

Hi every body,

When encoding of the html's report file is SJIS, japanese's characters is 
displayed incorrectly.

Is there a way that change the charset from UTF-8 to SJIS?.

Regards,
dung-vt







--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/c7ce9adc-83ce-0a39-c311-a71f4bdee213%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Is there a way to exclude methods from a class check?

2017-01-09 Thread Marc R. Hoffmann

Hi Mark,

unfortunatelly there is no way to exclude single methods from class 
coverage.


Regards,
-marc


On 09.01.17 17:26, mark.vallev...@unisys.com wrote:

I'm using maven.
Is there a way to exclude methods from a class check?
I can exclude methods in a rule for a method element.
I can exclude classes in a rule for a class element.
But, is there a way to exclude methods in a rule for a class element?
I want to check line and branch coverage minimum ratios for classes, but I want 
to exclude some methods from that check.

Thank you.
Mark K Vallevand




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/d9f0adf4-0b1a-ef8a-b577-dc4f94cb3817%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: VerifyError with JavaSE-1.8

2016-12-13 Thread Marc R. Hoffmann

Hi Adrian,

can you please add the option classdumpdir for the JaCoCo agent? This 
will dump all classes as seen by the agent. If you send us the 
problematic class file we can do further analysis.


Regards,
-marc

On 13.12.16 10:12, 'Adrian Price' via JaCoCo and EclEmma Users wrote:
Actually, we're not using EclEmma /per se/; our CI infrastructure 
launches Eclipse via the 'library.xml' Ant script that comes with the 
Eclipse Test Framework, which is essentially a means of using Ant to 
execute JUnit tests within a running Eclipse instance. We're using 
jacoco-0.7.7.201606060606 and instrumentation is performed dynamically 
using -javaagent:jacocoagent.jar=destfile=etc


I'll keep you posted if I learn anything further; thanks again for 
your responses.


Regards,

--A

On 12 December 2016 at 23:44, Evgeny Mandrikov > wrote:


I guess that you use JaCoCo via EclEmma since you said "JUnit
Plug-in Tests". And in this case I'm wondering how it can be
0.7.7? Latest EclEmma 2.3.3 uses JaCoCo 0.7.6. To me seems that
the only difference between 0.7.6 and 0.7.7 potentially on this
subject is about upgrade from ASM 5.0.4 to ASM 5.1, but I don't
see nor how this change nor how changes in ASM could affect you.
Anyway please confirm what you use?

Not excluded that Eclipse Java Compiler produces something
strange, example from past -
https://bugs.eclipse.org/bugs/show_bug.cgi?id=171472


And once again - might be possible to investigate this just by
sending us single class file with which you face issue.

And as a workaround maybe you can simply exclude this single class
from instrumentation.

In any case - keep us posted.

Regards,
Evgeny

On Monday, December 12, 2016 at 10:53:29 AM UTC+1, Adrian Price
wrote:

Evgeny, many thanks for the response - I'm encouraged to hear
that JaCoCo supports Java 8 and that work on Java 9 is
underway. My apologies for not picking this up from the FAQ.

JaCoCo is the only bytecode manipulation tool in use in our
continuous integration stack - we're compiling to Java 1.7
compliance using the Eclipse 4.4 Java compiler, and tests are
executed as 'JUnit Plug-in Tests' on Eclipse 3.7.2 in an
Oracle 1.8 JVM (the final application runtime is actually Java
7, but Selenium Client 3.x seems to require Java 8). I will
experiment with compiling using later versions of Eclipse 4.x
to compile the classes - perhaps there's a problem there.

Cheers,

Adrian

On 9 December 2016 at 17:31, Evgeny Mandrikov
mailto:mandri...@gmail.com>> wrote:

JaCoCo does support Java 8 already for a very long time -
see "What Java versions are supported by JaCoCo?" in our
FAQ at http://www.eclemma.org/jacoco/trunk/doc/faq.html

Moreover - work on support of Java 9 has been started.
As of today we have very extensive tests targeting various
JDKs, also JaCoCo is used by many projects targeting Java
8. And we are not aware of any example that could lead to
"java.lang.VerifyError Expecting a stackmap frame at
branch target nn" and thus believe that JaCoCo generates
valid bytecode.
Also note that as stated in our FAQ: JaCoCo expected to
produce valid "stackmap frames" when original is valid.
Hence questions:
Might it be possible that original is invalid, e.g.
produced by some other bytecode manipulation tool?
Would it be possible to provide reproducer/example or at
least original class file that causes this issue? To get
an impression about speed and depth of investigations in
presence of proper information - you can have a look for
example at https://github.com/jacoco/jacoco/issues/394
 and
https://github.com/jacoco/jacoco/issues/462


On Friday, December 9, 2016 at 12:58:43 PM UTC+1,
apr...@tibco.com  wrote:

Running the latest jacoco-0.7.7.201606060606 in
Eclipse under JavaSE-1.8 (Oracle jdk1.8.0_91), the
instrumented AUT classes refuse to load:

java.lang.VerifyError Expecting a stackmap frame at
branch target nn

I recall encountering something similar under
JavaSE-1.7 as a consequence of JaCoCo apparently
injecting incorrect bytecode. I had to run with
-XX:-UseSplitVerifier.

To get this running under jdk1.8.x 

Re: [java code coverage] No source code highlighting being generated

2016-12-09 Thread Marc R. Hoffmann

Hi,

did you have a look at our FAQ? 
http://www.eclemma.org/jacoco/trunk/doc/faq.html



 Why does the coverage report not show highlighted source code?

Make sure the following prerequisites are fulfilled to get source code 
highlighting in JaCoCo coverage reports:


 * Class files must be compiled with debug information to contain line
   numbers.
 * Source files must be properly supplied at report generation time.
   I.e. specified source folders must be the direct parent of the
   folders that define the Java packages.


Please especially check whether the last point is fulfilled.

Regards,
-marc


On 08.12.16 18:23, gilst...@gmail.com wrote:

Setup is JBoss 4.3 running a project with unit tests being run via ant.

I am generating the coverage on the JBoss project.

The report generates but there is no view source generated with colored line 
coverage.
The java files are in the fileset directory.
Thoughts?
Thanks

here is the report generation script






 


 

















--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/b83f689f-fea5-7add-42b4-ea40b1465b67%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Add Coverage Reports built with org.jacoco.ant.ReportTask to maven site?

2016-12-01 Thread Marc R. Hoffmann

Hi Dan,

you might consider our new Maven goal report-aggregate which has been 
designed specifically for this use case:


http://www.eclemma.org/jacoco/trunk/doc/report-aggregate-mojo.html

Regards,
-marc

On 01.12.16 20:24, danmitc...@gmail.com wrote:

Hi,

I was wondering if there is a way to add coverage reports to maven site that 
were generated with the maven-antrun-plugin.

I'm working in a multi module setup and performing offline instrumentation set 
up like this:

Parent pom
--module1
--module2
--integration-tests

I generate the reports using the maven-antrun-plugin in the integration-tests 
project and would like to just attach those reports to site.

Dan




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/3584d33a-0b53-3a96-fd3b-9c0318b926fb%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco with Kotlin: Line number X is greater than the source file

2016-12-01 Thread Marc R. Hoffmann

Hi Alex,

JaCoCo simply uses the debug information contained in class files. What 
could go wrong in your case:


1) Kotlin compiler created wrong line number informations --> Check with 
javap -v whether the debug line numbers make sense (alternatively send 
source & class file to this list)

2) coveralls-maven-plugin has a bug --> report to them

Regards,
-marc


On 01.12.16 19:04, Alexander Koch wrote:

Hello,

I am using Jacoco for coverage reports in mixed Java with Kotlin 
projects and most of the time it is working well. In one case I am 
facing an issue of getting an error when a Kotlin file is analyzed.


I have a maven project with Jacoco Plugin and Coverall Plugin and 
while Jacoco reports are fine, the Coverall plugin has an issue using 
Jacoco to gather information:


[ERROR] Failed to execute goal 
org.eluder.coveralls:coveralls-maven-plugin:4.1.0:report (default-cli) 
on project BinaryDataParser: Build error: Line number 91 is greater 
than the source file 
bdp-processor/src/main/java/org/ak80/bdp/MappedClass.kt size -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to 
execute goal org.eluder.coveralls:coveralls-maven-plugin:4.1.0:report 
(default-cli) on project BinaryDataParser: Build error
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

Caused by: org.apache.maven.plugin.MojoExecutionException: Build error
at 
org.eluder.coveralls.maven.plugin.CoverallsReportMojo.execute(CoverallsReportMojo.java:251)
at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)

... 20 more
Caused by: java.lang.IllegalArgumentException: Line number 91 is 
greater than the source file 
bdp-processor/src/main/java/org/ak80/bdp/MappedClass.kt size
at 
org.eluder.coveralls.maven.plugin.domain.Source.addCoverage(Source.java:92)
at 
org.eluder.coveralls.maven.plugin.parser.JaCoCoParser.onEvent(JaCoCoParser.java:61)
at 
org.eluder.coveralls.maven.plugin.parser.AbstractXmlEventParser.parse(AbstractXmlEventParser.java:64)
at 
org.eluder.coveralls.maven.plugin.CoverallsReportMojo.writeCoveralls(CoverallsReportMojo.java:366)
at 
org.eluder.coveralls.maven.plugin.CoverallsReportMojo.execute(CoverallsReportMojo.java:240)

... 22 more

I anyone able to help me solve this please?

with regards
Alex
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/8b129c4d-0cb6-4004-8669-bf1ca3b7063c%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe

Re: [java code coverage] Re: JBoss Application Server Jacoco Coverage

2016-11-29 Thread Marc R. Hoffmann

Hi Leon,

so the session page on the report (link in the top right corner) is 
completely empty, right?


Let's clarify some things first:

- the Ant variables e.g. ${jacoco.exec.file} are properly defined and 
point to the right locations?
- Why is the variable ${instrumented.classes.dir} named like this? 
JaCoCo needs the original class files for report generation (the exact 
same class files as deployed to your app server).


Can you please provide the Ant log output?

Regards,
-marc

On 30.11.16 03:03, leonchin...@gmail.com wrote:

Hi Marc,

Thanks for the reply. On the remote server, I've had Jacoco added to my remote 
application and have a java agent running with this property: 
javaagent:%DELIVERABLE_HOME%/jacoco/lib/jacocoagent.jar=output=tcpserver,address=*,port=6300,append=true,includes=com.myproject.*

I have an Ant build with the following tasks:


   



   



   
 
   
 
   
 
   
 

 
 
   
   
 
   
   
   
   
   


At the same time, I have a Node server running in the same directory, with the 
server address pointing to my machine's IP address. When I tried running the 
report generation Ant task, the generated reports would be empty and the 
session data is empty as well. Am I doing anything wrong in this case?

On Tuesday, November 29, 2016 at 10:57:02 PM UTC+8, Marc R. Hoffmann wrote:

Hi Leon,

this szenario is supported by JaCoCo. You need to configure the JaCoCo
agent for your application server, see documentation:

http://www.eclemma.org/jacoco/trunk/doc/agent.html

There are several options to retrieve execution data without shutting
down the JBoss server:

1) Enable JMX control and trigger dump via JMX console (or request
execution data directly)
2) configure output=tcpserver and use the Maven goal or Ant task to
retrieve executin data.

Cheers,
-marc

On 29.11.16 10:54, leonchin...@gmail.com wrote:

To add on to this question, is it possible to generate the report without 
having the shutdown the JBoss server?

On Tuesday, November 29, 2016 at 4:53:21 PM UTC+8, leonc...@gmail.com wrote:

Hi,

I have a remote application running on a JBoss server. I'm currently running 
tests which make REST calls to this service. Is it possible to generate 
coverage reports of code on the server side?

Regards
Leon


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/9349f73f-33bf-118e-fe23-16bcf6199c89%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: JBoss Application Server Jacoco Coverage

2016-11-29 Thread Marc R. Hoffmann

Hi Leon,

this szenario is supported by JaCoCo. You need to configure the JaCoCo 
agent for your application server, see documentation:


http://www.eclemma.org/jacoco/trunk/doc/agent.html

There are several options to retrieve execution data without shutting 
down the JBoss server:


1) Enable JMX control and trigger dump via JMX console (or request 
execution data directly)
2) configure output=tcpserver and use the Maven goal or Ant task to 
retrieve executin data.


Cheers,
-marc

On 29.11.16 10:54, leonchin...@gmail.com wrote:

To add on to this question, is it possible to generate the report without 
having the shutdown the JBoss server?

On Tuesday, November 29, 2016 at 4:53:21 PM UTC+8, leonc...@gmail.com wrote:

Hi,

I have a remote application running on a JBoss server. I'm currently running 
tests which make REST calls to this service. Is it possible to generate 
coverage reports of code on the server side?

Regards
Leon


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/8ffb9ca9-eb2a-2482-87a2-ffcaa7d530e7%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Regarding code coverage for the Osgi bundles

2016-11-24 Thread Marc R. Hoffmann

Hi,

first obvious thing to check: Does the directly

%JACOCO_HOME%/reports/

exist? JaCoCo agent does not create the directory for you.

Regards,
-marc

On 24.11.16 07:05, chidambar...@gmail.com wrote:

Hi All
Can any one tell the steps to configure jacoco to apache-karaf

And i also follwed the steps the link below
https://groups.google.com/forum/#!topic/jacoco/YWRr3lS5gw4


Steps are:

1.Download the Jacoco package http://www.eclemma.org/jacoco/
2.Extract the jar to some folder in your local machine viz. 
3.Create folder /reports
4.Create folder /reports/jacococlasses
5.In karaf.bat put following
   5.1 set JACOCO_HOME=/Jacoco
   5.2 set DEFAULT_JAVA_OPTS=-server -Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM% 
-Dderby.system.home="%KARAF_DATA%\derby" -Dderby.storage.fileSyncTransactionLog=true 
-Dcom.sun.management.jmxremote 
-javaagent:%JACOCO_HOME%/lib/jacocoagent.jar=destfile=%JACOCO_HOME%/reports/jacoco.exec,append=true,includes=com..*,dumponexit=true,output=file,classdumpdir=%JACOCO_HOME%/reports/jacococlasses
6.Start karaf
Execute the tests that you want to perform on AUT
Shutdown the karaf elegantly (I use Ctrl + D)
See that jacoco.exec is now populated and /reports/jacococlasses
Download eclipse (I used Kepler)
Install maven plugin
Create a project jacoco-maven-plugin
Create a POM file with content given below
Run maven project (RClick on project -> Run As -> Maven Clean)
Run maven project (RClick on project -> Run As -> Maven Install)
Now copy the classes (com folder) from /reports/jacococlasses to 
/target/classes
Copy jacoco.exec from /reports/ to /target
Now from eclipse run the plugin (RClick on project -> Run As -> Run 
Configurations)
In goals put "org.jacoco:jacoco-maven-plugin:report"
Click on Run
On successful run a new folder /site/jacoco will be 
created
The code coverage report can be opened from 
/site/jacoco/index.html




i am facing proble in the 5th steps

error message:
root1@root1-HP-EliteBook-820-G2:~/onos$ ok
Creating local cluster configs for IP 127.0.0.1...
Staging builtin apps...
Customizing apps to be auto-activated: drivers,openflow,fwd,proxyarp,mobility...
/home/root1/Applications/apache-karaf-3.0.5/bin/karaf: 274: 
/home/root1/Applications/apache-karaf-3.0.5/bin/karaf: cannot open 
Path_TO_JACOCO: No such file





Regards
Chidambar babu



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/c97a43ed-eef3-1cff-c2b9-98dec725c99d%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] offline instrumentation issue !!!

2016-11-15 Thread Marc R. Hoffmann

Hi,

this is a known issue that can happen for very large methods: 
https://github.com/jacoco/jacoco/pull/177


The only work around for now is to exclude the problematic class 
("ConfigDAO").


Regards,
-marc

On 15.11.16 07:40, yajvane wrote:

Hi,
Trying to instrument using command "mvn 
org.jacoco:jacoco-maven-plugin:instrument" & here is the exception thrown.


[ERROR] Failed to execute goal 
org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:instrument 
(default-cli) on project PSP-Commons: Unable to instrument file. Error 
while instrumenting class 
/workspace/mbagalko_denalibr/psc/branches/psc_denali_br/psp/src/psp/components/commons/target/classes/com/cisco/epm/pap/api/services/persistance/dao/ConfigDAO.class. 
java.lang.ClassNotFoundException: 
com.cisco.epm.pap.api.vo.AuthenticationConfig -> [Help 1]


org.apache.maven.lifecycle.LifecycleExecutionException: Failed to 
execute goal 
org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:instrument 
(default-cli) on project PSP-Commons: Unable to instrument file.


at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)


at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)


at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)


at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)


at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)


at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)


at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)


at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)


at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


at java.lang.reflect.Method.invoke(Method.java:483)

at 
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)


at 
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)


at 
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)


at 
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)


Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to 
instrument file.


at org.jacoco.maven.InstrumentMojo.executeMojo(InstrumentMojo.java:85)

at org.jacoco.maven.AbstractJacocoMojo.execute(AbstractJacocoMojo.java:63)

at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)


at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)


... 20 more

Caused by: java.io.IOException: Error while instrumenting class 
/workspace/mbagalko_denalibr/psc/branches/psc_denali_br/psp/src/psp/components/commons/target/classes/com/cisco/epm/pap/api/services/persistance/dao/ConfigDAO.class.


at 
org.jacoco.core.instr.Instrumenter.instrumentError(Instrumenter.java:160)


at org.jacoco.core.instr.Instrumenter.instrument(Instrumenter.java:111)

at org.jacoco.core.instr.Instrumenter.instrument(Instrumenter.java:152)

at org.jacoco.maven.InstrumentMojo.executeMojo(InstrumentMojo.java:83)

... 23 more

Caused by: java.lang.RuntimeException: 
java.lang.ClassNotFoundException: 
com.cisco.epm.pap.api.vo.AuthenticationConfig


at 
org.objectweb.asm.ClassWriter.getCommonSuperClass(ClassWriter.java:1719)


at org.objectweb.asm.ClassWriter.getMergedType(ClassWriter.java:1689)

at org.objectweb.asm.Frame.merge(Frame.java:1426)

at org.objectweb.asm.Frame.merge(Frame.java:1325)

at org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1475)

at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1567)

at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1017)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:693)

at org.objectweb.asm.ClassReader.accept(ClassReader.java:506)

at org.objectweb.asm.ClassWriter.toByteArray(ClassWriter.java:995)

at org.jacoco.core.instr.Instrumenter.instrument(Instrumenter.java:85)

at org.jacoco.core.instr.Instrumenter.instrument(Instrumenter.java:108)

... 25 more

[ERROR]

[ERROR]

[ERROR] For more information about the errors and possible solutions, 
please read the following articles:


[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException




The same is working fine for other maven projects. It is failing only 
in this case. Also, it looks stack trace is poi

Re: [java code coverage] Exclude classes by pattern from report using JAVA API

2016-11-11 Thread Marc R. Hoffmann

Hi,

yes, analyzeClass() of course. analyzeAll() will also work as long as 
you supply only the relevant class files individually.


Regards,
-marc

On 11.11.16 18:11, yevsh wrote:

On Friday, 11 November 2016 19:06:40 UTC+2, Marc R. Hoffmann  wrote:

Hi,

absolutely: Just supply ony the class files you want to see in the
report to Analyser.analyse().

Regards,
-marc

On 11.11.16 17:09, yev...@gmail.com wrote:

Is it possible to exclude classes while generating report (html) using jacoco 
apis?

Wasn't able to find...

Thanks


you mean analyzeClass(...) method?
because there is no analyse method in Analyser class.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/24fba851-a401-9265-e4bb-29fd1ccd8016%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Exclude classes by pattern from report using JAVA API

2016-11-11 Thread Marc R. Hoffmann

Hi,

absolutely: Just supply ony the class files you want to see in the 
report to Analyser.analyse().


Regards,
-marc

On 11.11.16 17:09, yev...@gmail.com wrote:

Is it possible to exclude classes while generating report (html) using jacoco 
apis?

Wasn't able to find...

Thanks




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/081981c2-e14f-f6ca-6885-6c2732bca0d9%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Does JaCoCo support velocity

2016-11-01 Thread Marc R. Hoffmann

Hi,

JaCoCo does not support any coverage comparison between different 
versions of source code.


As mentioned before SonarQube supports code coverage on changed code 
(with JaCoCo). You might ask them whether this specific feature is 
available: http://www.sonarqube.org/get-support/


Regards,
-marc

On 01.11.16 22:34, djyu...@gmail.com wrote:

Let me provide with example:

You have code with 4 branches and 3 or them is covered so branch coverage is 
3/4 = 75%. Then you make a change and added 2 branches with just 1 branch 
covered. So velocity coverage is 1/2 = 50% and my question is if JaCoCo 
supports that metric?
It's kind of diff coverage.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/0c3033d4-4ed2-f33b-57cc-6e1cc4b13647%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Does JaCoCo support velocity

2016-11-01 Thread Marc R. Hoffmann

Hi,

sorry for my stupid question: What do you mean by "velocity"?

Coverage on changed code is supported in combination with SonarQube.

Regards,
-marc

On 01.11.16 20:54, djyu...@gmail.com wrote:

Does JaCoCo support velocity so I can check what branch coverage in code I 
changed?



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/8ff366e8-1f90-d40f-8e45-d8d4a45f1dba%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Code Coverage Report for manual testing (Jacoco)

2016-10-31 Thread Marc R. Hoffmann

Hi Sriram,

JaCoCo should be fine with JAR files, it will automatically read classe 
files from it. Works even recursively e.g for JAR files in WAR files.


To help you it would be useful to see the full error message. There 
should be more text after "Error while creating report" with the exact 
technical details.


Regards,
-marc

On 31.10.16 13:09, srirams...@gmail.com wrote:

Hi Marc,

As you mentioned, I have used Jacoco.exec and the class files of our product. 
Coverage Report is successfully generated. But for this, I needed to extract 
the jars and unzip them and point to that folder. But, in our installation, we 
only have jar files and class files are not visible, unless we explicitly unzip 
them.

I tried to include jars but, I always get an error "Error while creating report"

Is there a way that I can generated Code coverage reports for jars but not 
classes?  Iam adding my target code for your convenience.

***






 
 

 
 
 
 
 
 
 
 
 

 
 
 



*
Thanks already,

Always B happy,
Sriram



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/f71c275a-d99b-90cb-0892-76af21822e6c%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] EOFException on readExecutionData

2016-10-28 Thread Marc R. Hoffmann

Hi,

this means exec file is truncated somewhere in the middle. Typical cause 
for this is non-graceful shutdown of the JVM running the tests.


Cheers,
-marc

On 28.10.16 09:14, tc0...@gmail.com wrote:

Hi,

JaCoCo is randomly failing when it generates the report. Sometimes EOFException 
is thrown on readExecutionData(). This happens randomly and more often on 
Travis, and rarely on local dev box.
I'm pretty new to JaCoCo. Would someone show me the best way to debug this?

This doesn't happen that often when I was using 0.7.5.201505241946.

Stacktrace:
[ERROR] Failed to execute goal 
org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:report-aggregate (jacoco-report) 
on project livy-coverage-report: An error has occurred in JaCoCo Aggregate report 
generation. Error while creating report: null: EOFException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal 
org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:report-aggregate 
(jacoco-report) on project livy-coverage-report: An error has occurred in 
JaCoCo Aggregate report generation.
...
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(DataInputStream.java:267)
at 
org.jacoco.core.internal.data.CompactDataInput.readBooleanArray(CompactDataInput.java:63)
at 
org.jacoco.core.data.ExecutionDataReader.readExecutionData(ExecutionDataReader.java:149)
at 
org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:115)
at 
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:92)
at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:73)
at 
org.jacoco.maven.ReportSupport.loadExecutionData(ReportSupport.java:87)
at 
org.jacoco.maven.ReportAggregateMojo.loadExecutionData(ReportAggregateMojo.java:116)
at 
org.jacoco.maven.ReportAggregateMojo.loadExecutionData(ReportAggregateMojo.java:109)
at 
org.jacoco.maven.AbstractReportMojo.executeReport(AbstractReportMojo.java:177)
... 22 more
Travis build log:
https://travis-ci.org/hdinsight/livy/jobs/171299465

POM file:
https://github.com/hdinsight/livy/blob/de9a35e39508bc05297ccdd90c60bc05cd72cf51/pom.xml

Thanks!
Alex



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/9963365e-f44e-bd32-c25f-3d96cd4b74a0%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] What has happened to eclemma.org?

2016-10-27 Thread Marc R. Hoffmann

Hi,

we're currently in the transition to Eclipse.org and configured new DNS 
servers. Obiously soemthing didn't run as smoothly as expected.


Please stay tuned, should be up again within the next hours.

Sorry for the inconvenience,
-marc

On 27.10.16 12:56, tuh...@gmail.com wrote:

Tried to install EclEmma to my computer from Eclipse Marketplace but the 
eclemma.org is not responding. Any information?



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/855f309f-b3b2-e95e-5b82-6a25edc4893a%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Code Coverage Report for manual testing (Jacoco)

2016-10-27 Thread Marc R. Hoffmann

Hi Sriram,

you need to create an report with the tools provided with JaCoCo. For 
report generation you need


1) exec files
2) Same class files (or JARs) used at runtime
3) Optionally source files (for hilighting)

JaCoCo comes with a report Maven goal or Ant task. Alternatively you 
could use the Java API or any other build tool with JaCoCo integration:


 * http://www.jacoco.org/jacoco/trunk/doc/report-mojo.html
 * http://www.jacoco.org/jacoco/trunk/doc/ant.html#report
 * http://www.jacoco.org/jacoco/trunk/doc/examples/java/ReportGenerator.java

Regards,
-marc

On 27.10.16 12:06, srirams...@gmail.com wrote:

Hi,

We are planning to generate Code Coverage reports for our manual testing for 
the web application hosted on Weblogic.

The intention is that, we want to run some tests on the application and see the 
code coverage and depending on that, we want to improve our tests.

I have added jacocoagent.jar in setDomainEnv.sh. Then I started the weblogic 
managed server and the application was up. I logged in into the application and 
performed some operations and shutdown the AppServer. Now I have a jacoco.exec 
file.

How do i check the contents of this file? How can this be represented in a xml 
or html format? We dont have access to the actual source code as we are testers 
and we dont have automated tests also in this context.

Ccan some one please help me with addressing this issue?

Thanks in advance!

Regards,
Sriram




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/b951d7b2-ca99-134f-b5c3-ba4151e6fe36%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Aggregated report for maven multi-modules project

2016-10-27 Thread Marc R. Hoffmann

Hi,

unfortunatelly creating a explicit reporting module ("fake") is the only 
design we currentls support. We didn't find a other way to implement 
this in Maven. Here you find some reasoning about this design: 
https://github.com/jacoco/jacoco/wiki/MavenMultiModule


Alternatively you might consider external tools like SonarQube to create 
reports.


Regards,
-marc

On 27.10.16 11:44, plon...@gmail.com wrote:

Hi there,

I'm looking for a way to aggregate coverage report for a multi-modules maven 
project.

My project looks like:

Root
|-Module 1
|-Module 2
|-Module 3
|-|-Submodule 1
|-|-Submodule 2
|-Module 4

Some of the modules depend on some other, some do not.

What I would like to do is run "mvn test" on the root module, that will run all 
the tests for all the modules, and generate a single aggregated report covering all the 
modules.

I'm aware of "report-aggregate", but it aggregates reports only for the 
dependencies of a given module, which does not work in my case.

Is there a way to achieve that without having to create one "fake" module 
dependent on all the others? This is not suitable for me, as I have 25+ modules and it 
would require to manually list all of them and keep updating this list whenever I add a 
new module.

Thanks!



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/cab33edb-818f-1fc2-3650-6fb20310f5d3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Issue with Coverage view in Eclipse

2016-10-26 Thread Marc R. Hoffmann

Hi Frederic,

> Right-click on Coverage View only gives me "Import session". 
everything else is grayed.


This means there is no coverage session at all. Probably you run into 
the following issue from the FAQ:


http://www.eclemma.org/faq.html#trouble06


 The /Coverage/ view stays empty and there is no source
 highlighting. Why?

   In Eclipse preferences there is an option /Launch in debug mode when
   workspace contains breakpoints/ under /Run/Debug/ → /Launching/. If
   this option is enabled and there are breakpoints in your workspace
   /coverage/ mode will not work, because it is automatically replaced
   with /debug/ mode. Set this option to /Never/ if you want to run
   code coverage analysis.


Regards,
-marc

On 25.10.16 16:37, Frederic Filiatrault wrote:

Hi,

For an unknown reason, the Coverage View in Eclipse stopped showing 
results.  Was working fine yesterday, but today, nope. I googled a bit 
but found nothing which makes me think it's a simple thing I can't 
figure it out.  I tried several things


  * Uninstall and re-install EclEmma plugin (I also manually delete
the com.mountainminds.* folders)
  * Verified the exclusion list (nothing there)
  * Recreated the coverage configuration (which always worked fine)
  * Only my src folder is selected in the coverage folder (as it
always have  been)
  * There's a VM argument passed : "-ea".  That was always there
  * In preferences,
  o everything is checked on the 1st 4;
  o Default scope is "source folder only"
  o Coverage runtime:
  + Includes : *
  + Excludes : [nothing]
  + Exclude classloaders: sun.reflect.DelegatingClassLoader
  * I restored default values in preferences -> Java -> Code Coverage,
no good
  * Of course, All unit test (259) are green
  * I also tried to select some options for the view menu of the
Coverage View, no good
  * Right-click on Coverage View only gives me "Import session".
everything else is grayed.

Again, all these are default values. Using Neon.1 on Macbook Pro 
(Sierra).  Using JUnit 4, gradle.


Meanwhile, I'm using Jacoco in terminal but I really missed having the 
coverage in Eclipse.


Only thing I did not do was a complete reinstall of Eclipse (which is 
not an option).


Any suggestions would be appreciated.  Thx in advance!

F.
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/2b5fb172-2059-4391-a66c-13a704e20377%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/1efd1df0-4940-a4e9-0662-d321aac82de2%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Can't find the correct syntax for parameter in jacoco:report-aggregate

2016-10-24 Thread Marc R. Hoffmann

Hi Chris,

only those classes which are actually loaded are dumped. All other 
(uncovered!) classes would be missed.


Regards,
-marc

On 24.10.16 13:40, chris.neh...@gmail.com wrote:

Hi Marc,

Maybe the 'aggregate-report' could use the imported classes instead of the 
project output directories when the classDumpDir variable is defined?

Chris

Le vendredi 21 octobre 2016 13:05:57 UTC+2, Marc R. Hoffmann a écrit :

Hi,

'useJar' is a bit unspecific, depending on the type of build the name
can be different, there can be even multiple JARs. So I don't think we
would add such a feature.

Regards,
-marc


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/1e6d91ef-1f02-4785-d54c-946dc41aa18b%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Can we push the data to server after several hours using the current tcpclient mode?

2016-10-20 Thread Marc R. Hoffmann

Hi,

to get an better picture what actually happens: Can you please provide 
the Java exceptions that JaCoCo prints to syserr when the connection 
gets disconnected?


So what behavior do you expect from JaCoCo in tcpclientmode? Reconnect 
after failure?


Regards,
-marc

On 21.10.16 07:27, van basten wrote:


The problem for our environment is the network very unstable, alwasy 
lost connection after one hour.


As you know, for tcpclient mode, the socket between jacoco agent and 
the server is always connected.


Why we do not use the tcpserver mode? since we do not know how many 
machines installed jacoco agent, we need use the tcpclient mode to 
automatically connect to the server, then we can know.


any unclear, please let me know.

--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/36132c30-7f92-40fe-8cdf-0237286a148e%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/caa1924d-4269-465c-32f3-d169a16d6e88%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Can't find the correct syntax for parameter in jacoco:report-aggregate

2016-10-19 Thread Marc R. Hoffmann

Hi,

the classDumpDir option only applies to the prepare-agent goal. The 
aggregate report goal simply uses the projects output directory (e.g. 
target/classes). This behaviour currently can't be configured.


Cheers,
-marc

On 14.10.16 11:50, chris.neh...@gmail.com wrote:

Hi,

Thanks for the examples!

In fact, my real problem is: some of our integration tests run in a OSGI context. We use the 
"maven-bundle-plugin" to build each module bundle and the "maven-ipojo-plugin" 
because ... we use iPojo :). This plugin modifies some classes of the bundle to add some byte code. 
When the report-aggregate runs, it displays that it can manage these modified classes because they 
do not match to execution data.
I've added the "classDumpDir" in the root project:
${project.build.directory}/classdumps
but it has not changed the result. It seems that the aggregate-report don't use 
the dumped classes. Did I forget something?
Thanks for all.

Chris



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/011515d5-268a-5aa5-0c5b-a4eefa00a6ab%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] "Using Pre-Instrumented Classes With the Java Agent": where it works ¬ works ??

2016-10-17 Thread Marc R. Hoffmann

Hi,

the JaCoCo runtime needs to be accessible to by the executed classes. 
One option is to put it on the application classpath, another option is 
to configure the the JaCoC agent (all Java agents are added to classpath).


Typical pitfalls with offline instrumentations to check for:

1) The JaCoCo runtime must be the exact same version than the JaCoCo 
instrumentation tool.
2) The JaCoCo runtime classes must be visible to the classes under test 
from a classloading perspective. This is typically only the case for 
simple "main" applications. As soon as you run in containers (J2EE, OSGi 
etc.) the application classpath might not be visible to deployed components.


Regards,
-marc


On 17.10.16 09:55, yajvane wrote:

Hi,

As per the documentation available 
at http://www.eclemma.org/jacoco/trunk/doc/offline.html on "Using 
Pre-Instrumented Classes With the Java Agent' :


"*It is possible*to also use offline-instrumented classes with the 
JaCoCo Java agent. In this case the configuration is taken from the 
agent options. The agent must be configured in a way that 
pre-instrumented classes are excluded, e.g. with "|excludes=*|". 
Otherwise it will result in error messages on the console if the agent 
instruments such classes again."


I tried with couple of maven projects and able to see that this 
(pre-instrumented classes with jacoco-maven-plugin:prepare-agent test) 
is working fine. But, in some projects this is NOT workingand throwing 
an exception "Caused by: java.lang.ClassNotFoundException: 
org.jacoco.agent.rt.internal_6da5971.Offline" (I was following on this 
exception on separate thread).


Please help me in understanding this ! In what scenarios it works and 
not works !!! Would request to please elaborate on the phrase *"It is 
possible..."*


I understand that offline instrumentation + placing jacocoagent.jar 
in class-path is the right way, but some how ., with whatever the 
possible maven (pom.xml) configuration ., that's always throwing 
exception. That's why trying to understand the things at more deeper 
level !!!


Thank you !!!

-Regards,
Kesav.
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/f85f8ef7-dbf6-4950-95d2-6d382e0995c6%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/433812aa-481c-99ec-914c-d97c84448aac%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco Exec count shows 0

2016-10-17 Thread Marc R. Hoffmann

Right, from the log file you see that the goal is not executed.

So you need to configure your build that the goal actually gets 
executed! There is nothing special about that goal. Please refer to 
Maven documentation how to execute a goal.


Regards,
-marc

On 17.10.16 11:58, sneha agarwal wrote:

Hi Marc,
Attached the maven logs.
I do not see this goal being executed at all.

On Fri, Oct 7, 2016 at 7:20 PM, Marc Hoffmann 
mailto:hoffm...@mountainminds.com>> wrote:


Hi,

I was asking for the *maven* logfiles. This is where the dump goal
is executed. Looks like you provided the Jenkins logfile.

-marc

On 07.10.2016, at 14:15, sneha agarwal mailto:sneha@gmail.com>> wrote:


Hi Marc,
I am getting this
[JaCoCo plugin] Collecting JaCoCo coverage data...
[JaCoCo plugin] **/**.exec;**/coverage/classes-cov;**/taxmaster/; locations 
are configured
[JaCoCo plugin] Number of found exec files for pattern **/**.exec: 0
[JaCoCo plugin] Saving matched execfiles:
[JaCoCo plugin] Saving matched class directories for class-pattern: 
**/coverage/classes-cov:  
/data/jenkins/workspace/TaxMasterServiceCodeCoverage/coverage/classes-cov
[JaCoCo plugin] Saving matched source directories for source-pattern: 
**/taxmaster/:  
/data/jenkins/workspace/TaxMasterServiceCodeCoverage/Portal/apiTests/target/test-classes/com/myntra/apiTests/erpservices/taxMaster
 
/data/jenkins/workspace/TaxMasterServiceCodeCoverage/coverage/classes-cov/com/myntra/taxmaster/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com

/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra

/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster

/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/engine

/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/engine/impl

/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/manager

/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/manager/impl

/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/manager/impl/customerVat

/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/java/com/myntra/taxmaster/util

/data/jenkins/workspace/TaxMasterServiceCodeCoverage/taxmaster/tax-service/src/test/resources
[JaCoCo plugin] Loading inclusions files..
[JaCoCo plugin] inclusions: []
[JaCoCo plugin] exclusions: []
[JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=0, 
maxClass=30, minMethod=0, maxMethod=30, minLine=0, maxLine=30, minBranch=0, 
maxBranch=30, minInstruction=0, maxInstruction=30, minComplexity=0, 
maxComplexity=30]
[JaCoCo plugin] Publishing the results..
[JaCoCo plugin] Loading packages..
[JaCoCo plugin] Done.
[JaCoCo plugin] Overall coverage: class: 0, method: 0, line: 0, branch: 0, 
instruction: 0
Started calculate disk usage of build
On Fri, Oct 7, 2016 at 1:15 PM, Marc R. Hoffmann
mailto:hoffm...@mountainminds.com>>
wrote:

Hi, please check your maven log files. The dump goal should
log something like: - "Connecting to..." - "Dumping execution
data to..." Or a error is logged. This should give you an
idea what actually is going on. Regards, -marc On 06.10.16
20:14, sneha agarwal wrote:

I am using Jenkins plugin 2.0.1 and the jacoco version 0.7.6.
The coverage shows 0 and I do not see any exec file
generated as well.
Please suggest.
POM file used :
  
  org.jacoco
  jacoco-maven-plugin
  0.7.6.201602180812

  ../../coverage/jacoco.exec
  true
   false


   
  dump
  integration-test
  
 dump
  
   


and tomcat upddate CATALINA_OPTS="$CATALINA_OPTS

-javaagent:/path/tomcat/lib/jacocoagent.jar=output=tcpserver,append=true,dumponexit=false,classdumpdir=/path/tomcat/classes-cov/,includes=com/abc/abc/**,address=*"
-- You received this message because you are subscribed to
the Google Groups "JaCoCo and EclEmma Users" group. To
unsubscribe from this group and stop receiving emails from
it, send an email to jacoco+unsubscr...@googlegroups.com
<mailto:jacoco+unsubscr...@googlegroups.com>. To view this
discussion on

Re: [java code coverage] jacoco-maven-plugin:prepare-agent with "excludes" parameter syntax !!!!

2016-10-13 Thread Marc R. Hoffmann

Hi Kesav,

this should do the Job for the prepare-agent goal:


  
*
  


But if you use offline-instrumention there is no need for a agent, you 
can simply put it on the classpath. See this example in our documentation:


http://www.eclemma.org/jacoco/trunk/doc/examples/build/pom-offline.xml

Regards,
-marc

On 12.10.16 13:01, yajvane wrote:

Hi,

In order to get the coverage for power mock(mockito) based test cases 
., tried offline Instrumentation and looks it is working fine. However 
seeing this exception multiple times on console (Caused by: 
java.lang.IllegalStateException: Class x/y/z is already instrumented).


As per the jacoco documentation related to offline instrumentation: ( 
http://www.eclemma.org/jacoco/trunk/doc/offline.html) it looks there 
is an optional parameter "excludes=*" that can be used to stop this 
exception continuously getting popped-up on console.
How to specify this optional parameter as part of 
jacoco-maven-plugin:prepare-agent goal ?? 
(http://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html) . I 
tried different ways but any syntax is not working fine.


command trying to use:
 mvn org.jacoco:jacoco-maven-plugin:prepare-agent*["excludes=*]* test 
-Dmaven.test.failure.ignore=true



Thanks for all the help.

-Regards,
kesav.
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/81a09199-e8b9-489f-bcf0-74e1e4b98b83%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/b1035013-0b15-2a52-2cc1-8a36a60c5e3c%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Can't find the correct syntax for parameter in jacoco:report-aggregate

2016-10-13 Thread Marc R. Hoffmann

Hi,

please find an example in our tests:

https://github.com/jacoco/jacoco/blob/master/jacoco-maven-plugin.test/it/it-includes-excludes/pom.xml

Regards,
-marc

On 13.10.16 17:49, chris.neh...@gmail.com wrote:

Hello,

As described in http://www.eclemma.org/jacoco/trunk/doc/report-aggregate-mojo.html, 
I'm trying to use the  parameter  in jacoco:report-aggregate:

 
 
 
 org.jacoco
 jacoco-maven-plugin
 0.7.7.201606060606
 
 
 report-aggregate
 verify
 
 report-aggregate
 
 
 **/*.exec
 
 
 
 
 
 

Maven replies:
"[ERROR] Failed to execute goal 
org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:report-aggregate (report-aggregate) 
on project virtualization-jacoco-aggregate: Unable to parse configuration of mojo 
org.jacoco:jacoco-maven-plugin:0.7.7.201606060606:report-aggregate for parameter 
dataFileIncludes: Cannot assign configuration entry 'dataFileIncludes' with value 
'**/*.exec' of type java.lang.String to property of type java.util.List -> [Help 1]

Please, can someone explain what's the right syntax to use this parameter?
Thanks.

Chris



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/22619dba-01e1-f92a-939e-085b1ed5fc10%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] can jacoco results be diffents depending on jdk, os , agent and maven plugin

2016-10-13 Thread Marc R. Hoffmann

Hi,

execution data is different if you run JaCoCo in different class files. 
The cause for different class files can be:


- different compiler vendor
- different compiler version
- different compiler setting
- any post processing tool for classfiles (AOP, obfuscation etc)

Regards,
-marc


On 14.10.16 00:10, ponso...@gmail.com wrote:

Can they data generated by jacoco files be diffent depending on one of those? 
jdk/os/agent/maven plugin... ??




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/a5dcc785-80dc-d978-443e-5b6405a86d76%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Simple questions about JaCoCo design (agent.rt).

2016-10-13 Thread Marc R. Hoffmann

Hi Roberto,

it is because the agent can be considered as a plain resource. It has no 
API. The module org.jacoco.agent provide an API to retrieve the agent as 
a resource.


Regards,
-marc

On 14.10.16 01:54, Roberto Andrioli wrote:

Hey guys,

I have a simple question about the JaCoCo design. I noticed that the 
*agent.rt* is deployed to Maven central as a classifier (runtime) 
from artifact *agent*. There is any reason for that?


I'm guessing that this is due the fact that the *agent.rt* is built as 
a standalone JAR (with ASM included) and is not supplied wirh Javadoc 
and Sources (a requirement for Sonatype).


This is right? there is any other reason?

Regards

Roberto
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/8500294d-fd0d-4a66-ad0a-c56c37b8097a%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/d2440152-7da7-4918-f2d8-28ae990a3eb7%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco coverage lines count issue.

2016-10-07 Thread Marc R. Hoffmann

Works for both!

Regards,
-marc

On 07.10.16 10:57, yashwanth koundinya wrote:


Hi Marc,


One more question here. Does using offline instrumentation provide the 
coverage in combination for both PowerMockito and other tests or 
provides coverage for only PowerMocktio classes?


Thanks
Yashwanth
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/9efcf86a-915c-4836-9429-7b53bc419057%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/1906daf1-11cd-2eff-314e-de5175895c01%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco coverage lines count issue.

2016-10-07 Thread Marc R. Hoffmann

Hi Yashwanth,

offline instrumentation is actually quite tricky and not recommended. 
But if you want to try there it's all documented and there is also Maven 
example:


http://www.eclemma.org/jacoco/trunk/doc/

Regards,
-marc

On 07.10.16 10:46, yashwanth koundinya wrote:

Hi Marc,

Thanks a lot for the details provided.

Being a beginner in coding I am not much aware of offline 
instrumentation.


Can you please excuse me on that and provide an example on how offline 
instrumentation can be configured.


Thanks
Yashwanth
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/50b2837a-f577-4bf8-bae4-c7814ab11ab2%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/e0621dda-91c3-54cf-de70-30a05c0651a9%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco Exec count shows 0

2016-10-07 Thread Marc R. Hoffmann

Hi,

please check your maven log files. The dump goal should log something like:

- "Connecting to..."
- "Dumping execution data to..."

Or a error is logged. This should give you an idea what actually is 
going on.


Regards,
-marc

On 06.10.16 20:14, sneha agarwal wrote:

I am using Jenkins plugin 2.0.1 and the jacoco version 0.7.6.
The coverage shows 0 and I do not see any exec file generated as well.
Please suggest.
POM file used :
  
  org.jacoco
  jacoco-maven-plugin
  0.7.6.201602180812

  ../../coverage/jacoco.exec
  true
   false


   
  dump
  integration-test
  
 dump
  
   


and tomcat upddate CATALINA_OPTS="$CATALINA_OPTS 
-javaagent:/path/tomcat/lib/jacocoagent.jar=output=tcpserver,append=true,dumponexit=false,classdumpdir=/path/tomcat/classes-cov/,includes=com/abc/abc/**,address=*"

--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/96ad82d7-e3dd-4fc6-a09f-81baccc0a9e1%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/85a388f9-18bb-6745-7b11-134935cb9015%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] JaCoCo Source Code Structure

2016-10-07 Thread Marc R. Hoffmann

Hi Henry,

the documentation and the JavaDoc overview gives an idea what to find in 
the different bundles:


http://www.eclemma.org/jacoco/trunk/index.html
http://www.eclemma.org/jacoco/trunk/doc/api/index.html

Regards,
-marc

On 07.10.16 08:47, Henry M. wrote:

Hi.

Is it possible to find explanation about the code structure of JaCoCo?

For example, what is located under org.jacoco.agent.rt and what is 
under org.jacoco.agent, what is in org.jacoco.core?


Thanks,
Henry.


--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/b690382c-8cb4-40ae-8cae-b41e7ff61149%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/16e8aba3-3238-aefe-2e28-1e7ef1f8d234%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco coverage lines count issue.

2016-10-06 Thread Marc R. Hoffmann

Hi Yashwanth,

regarding your questions

1) Yes, this is a known limitation. As a work around for such scenarios 
we offer offline istrumentation 
(http://www.eclemma.org/jacoco/trunk/doc/offline.html).


2) This most likely happens because you use different compilers (ECJ vs. 
javac). JaCoCo relys on the debug information created by the compiler. 
Both compilers assign different lines to the compiled code: For example 
javac assigns the complete code of a multi-line expression to the first 
line of that expression, while ECJ assigns the different parts of the 
expression to the corresponding lines (so more lines in ECJ).


Regards,
-marc

On 06.10.16 08:56, yashwanth koundinya wrote:

Hi Team,

Firstly thanks for the aggregate report feature which really helped me 
to generate report for the multi-module project.


Here I am facing 2 issues as below.

1. The coverage is 0% for all the tests which use PowerMock. I got 
your answer for the same from another post saying Jacoco doesn't work 
with framwork like PowerMock.


2. When I run the coverage using EclEmma in Eclipse I see the total 
lines count different (*per each module and also the total sum*) when 
compared to the total lines count found in the html report generated 
after the build. Why can this happen?


Please let me know for additional information.

Thanks
Yashwanth
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/73b89dc2-eaec-47ec-bc91-a6682fad641d%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.

Hoffmann

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/7d4f34c0-fb34-de7d-3976-22b1fa55e1b0%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] adding multiple classes to coverage

2016-10-06 Thread Marc R. Hoffmann

Hi Ashley,

if I remember correctly we discussed about this before. I recommended to 
make your build/test setup running without code coverage first. Once you 
understand how Ant tasks java and junit work it is easy to integrate JaCoCo.


Do you have a running test setup based on Ant without JaCoCo?

Regards,
-marc

On 06.10.16 11:50, Ashley Simon wrote:

Hi,
We are working on code -coverage using jacoco-ant.Its been a long time 
and we are not able to move forward.
We are referring to the example given in 
http://www.eclemma.org/jacoco/trunk/doc/ant.html. But the thing is ,in 
the task coverage part...
they have specified a single class by  ,But we 
have multiple classes for coverage and we can't give a single class.
We have tried module attribute inside  ,it is not working and we 
don't have jar files ,so we can't use the jar attribute.
Is there any solution for this, where we can specify the folder 
containing the class files ?


Thanks and Regards,
Ashley
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/f938d1c5-46f5-4e0f-aae8-266c3ffae569%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/aeb1b5cb-0a06-6f9c-14de-8d21ee4eaacd%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] select active session in eclemma programmatically

2016-10-05 Thread Marc R. Hoffmann

Hi Mario,

use ISessionManager. activateSession(ICoverageSession) to activate the 
session after you have done magic.


Regards,
-marc

On 05.10.16 15:03, Mario Ackerl wrote:

Hi Marc,

I try to explain it with a pic: https://postimg.org/image/fbn7lr3mr/ ( 
result at the end of a test run -> no coverage session selected - 
coverage results from a deleted session are shown)
We have a coverage session for every test method. At the end of a 
suite I want to do some magic (add some summarized sessions for 
example). I also delete a few sessions. Unfortunately sometimes no 
session is selected as shown in the screenshot (active session 
deleted). I therefore want to select the active session for the user 
(developer), so that the active session at the end of a testsuite is 
the summarized session. Is there a way to do that with the API?


Regards,

Mario

Am Mittwoch, 5. Oktober 2016 13:19:10 UTC+2 schrieb Marc R. Hoffmann:

Hi Mario,

this is the API to activate a new Session. Note however that coverage
for the Java elements in scope is calculated as a background job. So
results are not available when this method returns.

Maybe cou can get a bit more specific about "this does not work as I
expected".

Regards,
-marc

On 2016-10-05 12:52, Mario Ackerl wrote:
> Hi,
>
> is there a way/API to programmatically switch the selected
session in
> eclemma? I supposed that activateSession (from ISessionManager)
should
> do that, but this does not work as I expected.
>
> Thanks in advance
>
> Mario
>
>  --
> You received this message because you are subscribed to the Google
> Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from
it, send
> an email to jacoco+un...@googlegroups.com .
> To view this discussion on the web visit
>

https://groups.google.com/d/msgid/jacoco/ddb0b399-705b-4251-a1ef-a0b786761765%40googlegroups.com

<https://groups.google.com/d/msgid/jacoco/ddb0b399-705b-4251-a1ef-a0b786761765%40googlegroups.com>

> [1].
> For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
>
>
> Links:
> --
> [1]
>

https://groups.google.com/d/msgid/jacoco/ddb0b399-705b-4251-a1ef-a0b786761765%40googlegroups.com?utm_medium=email&utm_source=footer

<https://groups.google.com/d/msgid/jacoco/ddb0b399-705b-4251-a1ef-a0b786761765%40googlegroups.com?utm_medium=email&utm_source=footer>


--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
<mailto:jacoco+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/61566e26-0f05-4078-bcad-36c8131a9c9a%40googlegroups.com 
<https://groups.google.com/d/msgid/jacoco/61566e26-0f05-4078-bcad-36c8131a9c9a%40googlegroups.com?utm_medium=email&utm_source=footer>.

For more options, visit https://groups.google.com/d/optout.



--
Marc Hoffmann
hoffm...@mountainminds.com
___
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/d4a2a993-2f17-a44b-0c1c-35cd3fd9ad38%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: Could not find or load main class

2016-09-20 Thread Marc R. Hoffmann

Hi Ashley,

probably you should first get an idea how Ant builds work before you 
start adding code coverage to it.


Please understand that we cannot provide support for Ant itself. As a 
starting point you might work through the tutorials in their manuals:


   http://ant.apache.org/manual/index.html

Regards,
-marc


On 20.09.16 14:10, Ashley Simon wrote:

Hi,
Yes, the code is written in java.My mistake !
Is there any way to have check the whole folder ?
Here, I guess the class name can take a particular class , so when 
giving * or the whole folder name ,It is giving error.

I tried with module..but it says  does not support nested module.
And there are no jar files , so I cant give any jar attribute.
Currently I wrote a code that commented the whole  part and gave 
the path for the class files in  itself. So, is it necessary to 
give that part ?
Can you also say whether the  is included in our 
build.xml for executing the test-cases in our project ?


The newly written code :


  

 

  



  
   
 
   
 
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/04295ae7-c50d-4964-a065-f747b267a9c3%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/5df5beae-3396-ac1e-5049-fb1f466183a3%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Could not find or load main class

2016-09-19 Thread Marc R. Hoffmann

Hi,

I don't think "*" is a valid class name to launch a Java program.

I recommend to make your build running without JaCoCo first.

Also I wonder what you mean with "JavaScript". JaCoCo is a coverage tool 
for compiled languages (like Java) for the JVM. I don't think JaCoCo 
works with JavasScript.


Regards,
-marc

On 19.09.16 07:56, Ashley Simon wrote:

Hi ,
I am doing code coverage using JaCoCo with Ant Tasks.
I am able to get the jacoco.exec and the reports.
But the reports are showing 0% code coverage and there is an error as 
well .

The error is "Could not find or load main class *"

The test part of build.xml is as follows :

 

















I have to do coverage for more than one file which is located under 
*${result.classes.dir} .*

The code is written using JavaScript.

Thanks ,
Ashley Simon
--
You received this message because you are subscribed to the Google 
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to jacoco+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/a7338110-793f-4ea2-a663-e4ae0436490d%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.



--
Marc Hoffmann
hoffm...@mountainminds.com
___
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/fbd8641c-e4d3-40f2-0138-189478ba406b%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: jacoco merge error - Unable to read execution data file

2016-09-08 Thread Marc R. Hoffmann
If this is the only output then the file is not an execution data file 
at all.


How exactly do you create the file?


On 09.09.16 06:41, Rama wrote:

I tried to verify using example your provided and the problem is "Unknown block type 
a". What does this mean?


Exception in thread "main" java.io.IOException: Unknown block type a.
at 
org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReader.java:116)
at 
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.java:87)
at com.jda.nextgen.ua.widthndepth.JacocoDiag.dump(JacocoDiag.java:64)
at com.jda.nextgen.ua.widthndepth.JacocoDiag.execute(JacocoDiag.java:38)
at com.jda.nextgen.ua.widthndepth.JacocoDiag.main(JacocoDiag.java:89)



On Friday, September 9, 2016 at 9:23:46 AM UTC+5:30, Marc R. Hoffmann wrote:

Hi,

thanks for the stack trace! The trace indicates that
"E:\test\jacoco.exec" is not a valid execution data file or it has been
corrupted somehow.

If you can provide this file I can have a look what the issue is. You
can also inspect the file yourself using our code example here:

http://www.eclemma.org/jacoco/trunk/doc/examples/java/ExecDump.java

Regards,
-marc



On 08.09.16 12:33, rama.pell...@jda.com wrote:

On Wednesday, September 7, 2016 at 5:28:28 PM UTC+5:30, rama.p...@jda.com wrote:

Can we copy jacoco.exec ( execution data file) generated on linux to Windows 
and use it as input for merge ANT target? We are getting cannot read 
file(execution data file copied from linux) error while merge. Is there any way 
to fix this? More details below...

We want to merge execution data files generated on different envs (one generated on Linux 
for selenium and other generated on Windows for jUnits) to get a combined coverage 
report. We are using ANT, "jacoco:merge" is being run on Windows. We have 
copied jacoco.exec from Linux to Windows and trying to merge the files.




Hi Marc,

Here is the complete stacktrace

[jacoco:merge] Loading execution data file E:\test\jacoco.exec

BUILD FAILED
E:\test\build.xml:571: Unable to read E:\test\jacoco.exec
  at org.jacoco.ant.MergeTask.load(MergeTask.java:87)
  at org.jacoco.ant.MergeTask.execute(MergeTask.java:67)
  at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:435)
  at org.apache.tools.ant.Target.performTasks(Target.java:456)
  at 
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
  at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
  at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
  at org.apache.tools.ant.Main.runBuild(Main.java:854)
  at org.apache.tools.ant.Main.startAnt(Main.java:236)
  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.io.IOException: Unknown block type a.
  at 
org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReade
r.java:116)
  at 
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.jav
a:87)
  at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
  at org.jacoco.ant.MergeTask.load(MergeTask.java:85)
  ... 17 more



Below is my ANT target. In this mod1 jacoco.exec file was copied from a linux 
box and mod2 jacoco.exec files were generated on sam

Re: [java code coverage] Unable to read execution data file (jacoco-using ant tasks)

2016-09-08 Thread Marc R. Hoffmann

Well, have a look at the build output:

Loading execution data file D:\${exec.path}


Looks like your variable exec.path is not defined,

Regards,
-marc


On 08.09.16 12:59, ashlisimon24101...@gmail.com wrote:

Hi,
I'm trying to use jacoco with ant tasks.But while executing the ant command, it 
is not loading the jacoco.exec file. The result is :


Buildfile: \build.xml



!+! STARTED @ Thu Sep 08 16:09:50 IST 2016



!+! ENTERING code-coverage[\build.xml]


Build sequence for target(s) `jacoco.report' is [jacoco.report]

jacoco.report:[jacoco:report] Loading execution data file D:\${exec.path}!+! 
ERROR OCCURRED @ \build.xml:52:  !!!
***

!+! FINISHED @ Thu Sep 08 16:09:50 IST 2016
!+! Log: buildlogs\0041code_coverage.log

BUILD FAILED
\build.xml:52: Unable to read execution data file ${exec.path}

Total time: 0 seconds




--
Marc Hoffmann
hoffm...@mountainminds.com
___
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/4f17c91f-e77d-5741-68c8-476d12ee9ede%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: jacoco merge error - Unable to read execution data file

2016-09-08 Thread Marc R. Hoffmann

Hi,

thanks for the stack trace! The trace indicates that 
"E:\test\jacoco.exec" is not a valid execution data file or it has been 
corrupted somehow.


If you can provide this file I can have a look what the issue is. You 
can also inspect the file yourself using our code example here:


http://www.eclemma.org/jacoco/trunk/doc/examples/java/ExecDump.java

Regards,
-marc



On 08.09.16 12:33, rama.pell...@jda.com wrote:

On Wednesday, September 7, 2016 at 5:28:28 PM UTC+5:30, rama.p...@jda.com wrote:

Can we copy jacoco.exec ( execution data file) generated on linux to Windows 
and use it as input for merge ANT target? We are getting cannot read 
file(execution data file copied from linux) error while merge. Is there any way 
to fix this? More details below...

We want to merge execution data files generated on different envs (one generated on Linux 
for selenium and other generated on Windows for jUnits) to get a combined coverage 
report. We are using ANT, "jacoco:merge" is being run on Windows. We have 
copied jacoco.exec from Linux to Windows and trying to merge the files.





Hi Marc,

Here is the complete stacktrace

[jacoco:merge] Loading execution data file E:\test\jacoco.exec

BUILD FAILED
E:\test\build.xml:571: Unable to read E:\test\jacoco.exec
 at org.jacoco.ant.MergeTask.load(MergeTask.java:87)
 at org.jacoco.ant.MergeTask.execute(MergeTask.java:67)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
 at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
 at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:497)
 at 
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
 at org.apache.tools.ant.Task.perform(Task.java:348)
 at org.apache.tools.ant.Target.execute(Target.java:435)
 at org.apache.tools.ant.Target.performTasks(Target.java:456)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
 at 
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
 at org.apache.tools.ant.Main.runBuild(Main.java:854)
 at org.apache.tools.ant.Main.startAnt(Main.java:236)
 at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
 at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.io.IOException: Unknown block type a.
 at 
org.jacoco.core.data.ExecutionDataReader.readBlock(ExecutionDataReade
r.java:116)
 at 
org.jacoco.core.data.ExecutionDataReader.read(ExecutionDataReader.jav
a:87)
 at org.jacoco.core.tools.ExecFileLoader.load(ExecFileLoader.java:59)
 at org.jacoco.ant.MergeTask.load(MergeTask.java:85)
 ... 17 more



Below is my ANT target. In this mod1 jacoco.exec file was copied from a linux 
box and mod2 jacoco.exec files were generated on same windows m/c where merge 
target is run.








































--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this dis

Re: [java code coverage] jacoco merge error - Unable to read execution data file

2016-09-07 Thread Marc R. Hoffmann

Hi,

exec files are platform independent. Note however, that they might be 
incompatible between different JaCoCo releases, see 
https://github.com/jacoco/jacoco/wiki/ExecFileVersions.


It might be helpful if you provide the full errer message ans stack trace.

Regards,
-marc

On 07.09.16 13:58, rama.pell...@jda.com wrote:

Can we copy jacoco.exec ( execution data file) generated on linux to Windows 
and use it as input for merge ANT target? We are getting cannot read 
file(execution data file copied from linux) error while merge. Is there any way 
to fix this? More details below...

We want to merge execution data files generated on different envs (one generated on Linux 
for selenium and other generated on Windows for jUnits) to get a combined coverage 
report. We are using ANT, "jacoco:merge" is being run on Windows. We have 
copied jacoco.exec from Linux to Windows and trying to merge the files.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/5be77785-1144-c285-0a02-b142c169f0cd%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] JaCoCo Command line options

2016-09-05 Thread Marc R. Hoffmann
Actually there is a old PR for this: 
https://github.com/jacoco/jacoco/pull/86


What was basically missing in the PR was documentation and tests, which 
is mandatory for whatever we include in JaCoCo. I like the annotation 
based aproach of command line parsing, but this should also be usable to 
generate docimentation.


Regards,
-marc



On 02.09.16 22:45, bjk...@gmail.com wrote:

I think it would be useful if JaCoCo itself provided a command-line tool for 
viewing/merging exec files and producing reports.  Is the JaCoCo team opposed 
to it, or is it just the case that no one has volunteered the time to do it?



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/759a4c58-2fff-10ad-bff9-fe7cc3930118%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] JaCoCo Command line options

2016-09-01 Thread Marc R. Hoffmann

Hi,

JaCoCo does not have a command line tool for report generation. There is

- Ant
- Maven
- API

and various 3rd-party integrations.

Regards,
-marc

On 01.09.16 14:38, anushreeagan...@gmail.com wrote:

Hi,
I want to use JaCoCo with makefile.
Currently I have used JaCoCoagent.jar with source code and got the jacoco.exec.

How do i generate the jacoco coverage report using command line options like 
emma .
Emma gives simple command line options to generate the reports.
Does Jacoco also support?


Please help


Regards
Anushree




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/e639958b-79e1-0b28-3cda-0d6d84a02ca5%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Restrict jacoco scope to only changes in current release tag

2016-08-26 Thread Marc R. Hoffmann

Hi,

this makes perfectly sense. Have a look at SonarQube, (which is backed 
by JaCoCo). It's called "Coverage on new Code".


Regards,
-marc



On 26.08.16 13:23, anban...@gmail.com wrote:

Hi
This might look like a odd request but is is possible to restrict jacoco scope 
to only changes in a release tag. In other words an integration with source 
control tool like Stash/Git etc, where only the changes in a release are picked.

if not, while recording, can we build some kind of filter in reports.

The major use case for this is to use it with an application that is in a 
maintenance phase and entire coverage is not that meaningful but the new change 
going in needs to have 100% coverage.

I hope this makes sense.




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/087389f2-8d19-8d64-e21b-6807d8a195f5%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] How to publish existing Jacoco Integration Test file to Sonarqube

2016-08-25 Thread Marc R. Hoffmann

Hi,

SonarQube is a different project. May I ask you to direct your question 
to their mailing list?


Thx,
-marc

On 25.08.16 09:58, harkun...@gmail.com wrote:

Hi,

We are generating the Jacoco.exec on the two separate servers and then want to 
publish it to Sonarqube separately after merging both the files. So how we can 
publish the merged file to Sonarqube.
Any pointers or help is appreciated.

Regards,
Harkunwar



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/29fec200-95e2-c141-96e6-62ab0529ae04%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_14f7ee5/Offline

2016-08-22 Thread Marc R. Hoffmann
No idea about Gradle and Android. First thing I would check is whether 
jacocoagent.jar is contained in the path given by the error message:


   Didn't find class "org.jacoco.agent.rt.internal_14f7ee5.Offline" on
   path: DexPathList[[zip file
   "/system/framework/android.test.runner.jar", zip file
   "/data/app/com.ourapp.next.debug.test-1/base.apk", zip file
   
"/data/app/com.ourapp.next.debug-2/base.apk"],nativeLibraryDirectories=[/vendor/lib,
   /system/lib]]

Regards,
-marc

On 22.08.16 22:28, Greg Loesch wrote:

Hm... do you have any tips to help troubleshoot this?

On Mon, Aug 22, 2016 at 12:21 PM Marc R. Hoffmann 
mailto:hoffm...@mountainminds.com>> wrote:


Looks like you use offline instrumentation (which is actually required
if you want to run your tests on Android) but jacocoagent.jar is
missing
on your classpath. Or jacocoagent.jar is a different version then the
JaCoCo version to instrument your classes.

Regard,
-marc

On 22.08.16 18:53, loesch.g...@gmail.com
<mailto:loesch.g...@gmail.com> wrote:
> I'm currently using Jacoco in Android with Gradle Build Tools
2.1.3 and Gradle(wrapper) 2.14.1. I get the following when running
my instrumentation tests:
>
> java.lang.NoClassDefFoundError: Failed resolution of:
Lorg/jacoco/agent/rt/internal_14f7ee5/Offline;
> at

com.ourapp.next.conversation.SomeList.SomeListViewModel.$jacocoInit(SomeListViewModel.java)
> at

com.ourapp.next.conversation.SomeList.SomeListViewModel.(SomeListViewModel.java)
> at

com.ourapp.next.conversation.SomeList.SomeListAdapterTest.(SomeListAdapterTest.java:26)
> at java.lang.reflect.Constructor.newInstance(Native Method)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
> at

org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)
> at

org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
> at

org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at

org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
> at

org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at

org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.junit.runners.Suite.runChild(Suite.java:128)
> at org.junit.runners.Suite.runChild(Suite.java:27)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
> at

android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
> at

android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
> at

android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1853)
> Caused by: java.lang.ClassNotFoundException: Didn't find class
"org.jacoco.agent.rt.internal_14f7ee5.Offline" on path:
DexPathList[[zip file "/system/framework/android.test.runner.jar",
zip file "/data/app/com.ourapp.next.debug.test-1/base.apk", zip
file

"/data/app/com.ourapp.next.debug-2/base.apk"],nativeLibraryDirectories=[/vendor/lib,
/system/lib]]
> at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
> ... 30 more
> Suppressed: java.lang.ClassNotFoundException:
org.jacoco.agent.rt.internal_14f7ee5.Offline
> at java.lang.Class.classForName(Native Method)
> at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
> at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
&

Re: [java code coverage] java.lang.NoClassDefFoundError: Failed resolution of: Lorg/jacoco/agent/rt/internal_14f7ee5/Offline

2016-08-22 Thread Marc R. Hoffmann
Looks like you use offline instrumentation (which is actually required 
if you want to run your tests on Android) but jacocoagent.jar is missing 
on your classpath. Or jacocoagent.jar is a different version then the 
JaCoCo version to instrument your classes.


Regard,
-marc

On 22.08.16 18:53, loesch.g...@gmail.com wrote:

I'm currently using Jacoco in Android with Gradle Build Tools 2.1.3 and 
Gradle(wrapper) 2.14.1. I get the following when running my instrumentation 
tests:

java.lang.NoClassDefFoundError: Failed resolution of: 
Lorg/jacoco/agent/rt/internal_14f7ee5/Offline;
at 
com.ourapp.next.conversation.SomeList.SomeListViewModel.$jacocoInit(SomeListViewModel.java)
at 
com.ourapp.next.conversation.SomeList.SomeListViewModel.(SomeListViewModel.java)
at 
com.ourapp.next.conversation.SomeList.SomeListAdapterTest.(SomeListAdapterTest.java:26)
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at 
org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)
at 
org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
at 
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at 
org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at 
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at 
android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
at 
android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
at 
android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1853)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.jacoco.agent.rt.internal_14f7ee5.Offline" 
on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file 
"/data/app/com.ourapp.next.debug.test-1/base.apk", zip file 
"/data/app/com.ourapp.next.debug-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
... 30 more
Suppressed: java.lang.ClassNotFoundException: 
org.jacoco.agent.rt.internal_14f7ee5.Offline
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 31 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class 
loader; no stack available

Any suggestions?




--
Marc Hoffmann
hoffm...@mountainminds.com
___
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/79a1c9d6-e94d-e6b3-02b3-f85e9c205d43%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco failed while instrumenting java project of JDK8(some projects succeed, some failed)

2016-08-08 Thread Marc R. Hoffmann

Hi,

what is the exact Java version? Please provide the output of

  java -version

Note that JaCoCo requires additional options for IBM VMs: 
http://www.eclemma.org/jacoco/trunk/doc/faq.html


Regards,
-marc

On 08.08.16 03:09, castlet...@gmail.com wrote:

Tomcat started.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at 
sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386)
at 
sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401)
Caused by: java.lang.RuntimeException: Class java/util/UUID could not be 
instrumented.
at 
org.jacoco.agent.rt.internal_6da5971.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:140)
at 
org.jacoco.agent.rt.internal_6da5971.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:101)
at 
org.jacoco.agent.rt.internal_6da5971.PreMain.createRuntime(PreMain.java:55)
at org.jacoco.agent.rt.internal_6da5971.PreMain.premain(PreMain.java:47)
... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
at java.lang.Class.getField(Class.java:1703)
at 
org.jacoco.agent.rt.internal_6da5971.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
... 9 more
FATAL ERROR in native method: processing of -javaagent failed




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/cf7aee54-0cd2-c0d5-6475-cf2b102dc71c%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Re: What kind of branching coverage is measured by Jacoco

2016-08-06 Thread Marc R. Hoffmann

Hi,

just for clarification: JaCoCo does not support MC/DC, which is defined as:

1. Each entry and exit point is invoked
2. Each decision takes every possible outcome
3. Each condition in a decision takes every possible outcome
4. Each condition in a decision is shown to independently affect the
   outcome of the decision.

JaCoCo does not support number 4.

Anyways JaCoCo targets the Java platform only which at least to my 
knowledge has not certified implementation anyways (for SIL 4 or the like).


Regards,
-marc


On 05.08.16 16:06, realtimecars...@gmail.com wrote:

[Sorry Evgeny - didn't think about visibility when replying from gmail...so I 
repost here]

Thanks, Evgeny!

Yes, this clarifies it - I was guessing it comes from the bytecode.
Condition Coverage is different for languages with and without short circuit 
semantics, true.
I guess I will need to look at this in more detail, but my understanding is 
that this is decision coverage (a.k.a. branching coverage) on bytecode level.
And you might be right, that it is (single) condition coverage for 
short-circuit semantics.
It's probably not MC/DC - question would be how complicated it would be to add 
MC/DC - this is an important coverage in safety criticial systems.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/7ff7914a-f973-38e8-0d6c-327017c98735%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Calculation Formula of JaCoco for Cyclomatic Complexity

2016-08-06 Thread Marc R. Hoffmann

Hi,

out formula is basically the "Method 3" in case of pure binary 
decission. E.g. for a simple if statement we have 2 branches at 1 
decission point. Our formula also works where decission points have more 
than two branches (e.g. switch statements). Here every additional case 
adds 1 to complexity.


The number of branches is typically higher than cyclomatc complexity. 
Consider the following method body:


if (cond1) {
  ...
} else {
  ...
}
if (cond2) {
  ...
} else {
  ...
}

Here we have 4 branches in total, but complexity is 3.

Regards,
-marc


On 05.08.16 17:36, external.manuel.lu...@gmail.com wrote:

Hi there,

we are just asking ourselve why Jacoco uses the following formula to calculate 
the cyclomatic complexity:


v(G) = B - D + 1 (B = number of branches, D = number of decision points)


as far as we did research into cyclomatic complexity there are 3 methods to 
calculate the cyclomatic complexity:

Method 1: CC = E - N + 2 (N = Nodes / E = Edges)

Method 2: CC = Total number of bounded areas + 1 (bounded area = any region 
enclosed by nodes and edges)

Method 3: CC = Total number of Decision Points + 1

I am asking this question because we have cases where the total number of 
branches in a class is higher than the cyclomatic complexity. Is this the right 
behaviour? Why do you subtract the decision points from the number of branches?




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/7ce4f4ec-8859-e846-2d37-64c7b77dbb7a%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Get complexity from Jacoco XML report

2016-07-28 Thread Marc R. Hoffmann

It can be easily calculated from the XML report:

missed complexity + covered complexity = total complexity

Regards,
-marc

On 25.07.16 12:46, external.manuel.lu...@gmail.com wrote:

I am currently having trouble to get cyclomatic complexity values from XML 
reports generated by JaCoco. Is there a possible way to get the cyclomatic 
complexity value from a XML report as it is present in HTML reports generated 
by Jacoco? - i.e. I need cyclomatic complexity not the missed / covered 
complexity values.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/8bd75596-8d48-8fbd-dfe3-d3c537fd608d%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] why doesn't jacoco support attaching to a running JVM?

2016-07-20 Thread Marc R. Hoffmann

Hi,

unfortunatelly this is not possible due to the following technical reasons:

1) It requires 1.6 JRE APIs. The baseline for JaCoCo currently is 1.5.
2) Attaching an agent after the application means that classes already 
been loaded needs to be re-transformed. Currently this is not possible 
as JaCoCo adds new fields ans methods. Also for other reasons we try to 
find another way bus we didn't succeed so far.


Regards,
-marc

On 20.07.16 10:19, sc.yi...@gmail.com wrote:

As title, I have serveral services running while I don't have access to modify 
the startup script. So why shouldn't we attach it to the running JVM?
Sorry for my bad english.



--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/a599845c-a7f0-15e1-d59f-b5f08c41e2fe%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Junits Passed but when covered in jacoco target tests failed Ant Script

2016-07-12 Thread Marc R. Hoffmann

Thanks! I just noted that you mentioned multiple errors.

What is the very first error log or exception you see?

Regards,
-marc

On 13.07.16 07:38, mohitaror...@gmail.com wrote:

On Tuesday, July 12, 2016 at 8:27:58 PM UTC+5:30, Marc R. Hoffmann wrote:

So you only use the jacoco:coverage tag, right? No offline
instrumentation?

Also, can you please provide a stacktrace?

Regards,
-marc

On 2016-07-12 14:41, mohitaror...@gmail.com wrote:

I am calculating coverage using jacoco using ant script.
Refering the documentation i have written my junit wrapped inside
jacoco target. When only junits are run they are successful without
any exception.
When running inside jacoco coverage target many give exceptions.

Most of them being
java.util.MissingResourceException

Could you all help ?

Yes Marc that is correct I am only using jacoco:coverage tag and no offline 
instrumentation.The Junits work fine when executed without the jacoco:coverage 
tag.
Please find the stack trace

null
java.lang.ExceptionInInitializerError
at wt.fc.WTObject.(WTObject.java:239)
at 
com.xxx.sc.disconnectedSystem._SCActivationRecord.(_SCActivationRecord.java:4)
at 
com.xxx.sc.disconnectedSystem.SCActivationRecord.(SCActivationRecord.java:55)
at 
com.xxx.sc.disconnectedSystem.SCActivationRecord.newSCActivationRecord(SCActivationRecord.java:69)
at 
com.xxx.sc.disconnectedSystem.SCActivationRecordTest.testNewSCActivationRecord(SCActivationRecordTest.java:9)
Caused by: java.util.MissingResourceException: Can't find resource for bundle 
wt.fc.fcResource_en, key 49
at java.util.ResourceBundle.getObject(ResourceBundle.java:450)
at java.util.ResourceBundle.getObject(ResourceBundle.java:444)
at java.util.ResourceBundle.getString(ResourceBundle.java:407)
at wt.fc.WTObjectCounter.(WTObjectCounter.java:401)




--
Marc Hoffmann
hoffm...@mountainminds.com
___
Mountainminds GmbH & Co. KG

Nussbaumstr. 4 * 80336 Muenchen * Germany
Phone/Fax +49-700-68664637 * 0700-MTNMINDS

Registergericht Muenchen * HRA 80201
Mountainminds Verwaltungs GmbH
Registergericht Muenchen * HRB 143183
Geschaeftsfuehrer Marc Hoffmann

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/0a1cdc69-5f47-01e8-dfce-1564a763cef9%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


Re: [java code coverage] Jacoco with gradle 1.10 and java 8 not working

2016-06-20 Thread Marc R. Hoffmann
What exact JDK version are sou using? In case it is it is IBM you need 
to provide a special option. See FAQ 
(http://www.eclemma.org/jacoco/trunk/doc/faq.html):



 Does JaCoCo run on the IBM JRE J9 and WebSphere?

It does. To make the JaCoCo agent work please set the VM option 
|-Xshareclasses:none|.



Regards,
-marc




On 20.06.16 11:36, suneet...@gmail.com wrote:

Hi,

I want to integrate jacoco with gradle.
I am using java8 and gradle 1.10
and jacoco vesion 0.6.2.201302030002.

Getting below error

  Caused by: java.lang.RuntimeException: Class java/util/UUID could not be 
instrumented.
 at 
org.jacoco.agent.rt.internal_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:13
 at 
org.jacoco.agent.rt.internal_5d10cad.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:99
 at 
org.jacoco.agent.rt.internal_5d10cad.PreMain.createRuntime(PreMain.java:51)
 at 
org.jacoco.agent.rt.internal_5d10cad.PreMain.premain(PreMain.java:43)



For other application also I integrated jacoco with java 8 and gradle 2.3 .
For that its working but for gradle 1.10 I am facing above issue.

Regards,
Suneetika




--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jacoco+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/9d69f665-10c3-2479-ab65-38cdb7a0c861%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   5   >