Thanks a lot Evgeny. That was indeed the issue. Unsetting the "includes" 
argument made it work!

On Friday, June 19, 2020 at 12:21:57 AM UTC-7, Evgeny Mandrikov wrote:
>
>
>
> On Friday, June 19, 2020 at 7:50:36 AM UTC+2 [email protected] 
> <javascript:> wrote:
>
>>
>> The following steps does not generate any coverage for code that is 
>> covered by tests.
>>
>> - I added the javaagent to the VM config of my service like this:
>>
>> *-javaagent:./lib/jacocoagent.jar=output=tcpserver,address=127.0.0.1,port=2710,includes=./target/classes/com/p/cd-poc
>>  
>> *-Dconfig=./etc/config.properties -Dlog.levels-file=./etc/log.properties
>>
>
> Please carefully read the documentation - 
> https://www.jacoco.org/jacoco/trunk/doc/agent.html :
>
> includes - A list of *class names* that should be included in execution 
> analysis. The list entries are separated by a colon (:) and may use 
> wildcard characters (* and ?). Except for performance optimization or 
> technical corner cases *this option is normally not required*.
>
> whereas your "./target/classes/com/p/cd-poc" looks like a directory name.
>
> *- *Next I brought up the service locally and hit an endpoint and 
>> generated a report using the jacococli.jar using the following commands:
>>
>> *java -jar lib/jacococli.jar dump --destfile jdump.exec --address 
>> 127.0.0.1 --port 2710*
>>
>> *java -jar lib/jacococli.jar report jdump.exec --classfiles 
>> cd-poc-1.0-SNAPSHOT.jar --xml j.xml*
>>
>>
>> The generated j.xml has 0 coverage for all the methods.
>>
>> I observed this behaviour even when the endpoint was hit using an 
>> integration test case. 
>>
>>
>> A little background about the code. The code is a JAVA service and the 
>> integration tests are written in Ruby.
>>
>> Am I missing something here? 
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/9d3a2679-30df-43e1-92d1-dd02b6892fceo%40googlegroups.com.

Reply via email to