here is an example where i am able to replicate the same issue mentioned. https://github.com/baleshkoijam/Example-sb-cucumber-jacoco-project
i had included the jacoco.exec file which was generated, you can use this file to see the code coverage report if required, Thanks On Thursday, 20 December 2018 13:32:28 UTC-5, Evgeny Mandrikov wrote: > > Hi, > > Unless you provide *COMPLETE example that can be easily executed by > others*, > I seriously doubt that you'll get any answer here. > > > Regards, > Evgeny > > On Monday, December 17, 2018 at 10:55:27 PM UTC+1, Balesh koijam wrote: >> >> Hello Jacoco Experts, >> >> i have a spring boot - micro service application for which i have written >> some BDD tests. >> >> As a further research from my previous POC, i did the following steps to >> generate the jacoco report. >> >> 1. Added the below java agent in the vM options of the run/Debug >> configurations screen of my TestRunner class. refer the screen shot below: >> >> >> -javaagent:C:\\Users\\U645789\\IdeaProjects\\jaragents\\org.jacoco.agent-0.8.2-runtime.jar=destfile=C:\\Users\\U645789\\IdeaProjects\\jaragents\\jacocoReward.exec,append=true >> >> >> [image: s1.JPG] >> >> 2. i started my spring boot application (micro service) using the boot >> run option. >> 3. Executed my BDD tests successfully and found the exec file has >> generated successfully. >> 4. Used the "show code coverage data" option of intellji to see the code >> coverage details and it shows all 0% for all sections. screen shot given >> below: >> >> [image: s2.JPG] >> >> >> Tried with a simple java class (in the same project) and see if the code >> coverage was reported correctly. i could see that for the normal simple >> java class where the actual function if executed directly from my test >> files, the code coverage details are showing up correctly. >> >> I am having a feeling that code coverage for my actual micro services are >> not reported due to the way the classes and methods are invoked when the >> test are executed. >> >> i used the RestAssured library to invoke the micro service. a sample code >> will be something like this. >> >> Response response = given(). >> contentType(ContentType.JSON). >> body(requestBody). >> headers(requestHeaders). >> when(). >> post(resourceURI). >> then(). >> extract(). >> response(); >> >> >> >> >> Any suggestions on what could be root cause will be really 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/4f133cf9-ba64-4da3-a279-a9682b88ad44%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
