I am trying to find coverage of my automation testing code using Jacoco-ant plugin. But the issue is my code base doesn't contain any Main method, so when I run the Jacoco code coverage over it, it shows -"No Main method found, please declare your main method as ...".
Is it possible for Jacoco to provide coverage when there are classes without any main method or in any way is it possible to skip the check for main method?
Thanks
Shekhar
Hi Shekhar,
JaCoCo does not require a main method. Actually it is the JVM which requires a main method to execute any Java program.
1) How do you run your application without JaCoCo?
2) What did you try to run the application with JaCoCo?
It will be helpful if you provide your Ant scripts for both cases.
Regards,
-marc
> On 21. Jun 2019, at 11:22, Shekhar <tchandra....@vit.ac.in> wrote:
>
> Hello,
>
> I am trying to find coverage of my automation testing code using Jacoco-ant plugin. But the issue is my code base doesn't contain any Main method, so when I run the Jacoco code coverage over it, it shows -"No Main method found, please declare your main method as ...".
> Is it possible for Jacoco to provide coverage when there are classes without any main method or in any way is it possible to skip the check for main method?
>
> Thanks
> Shekhar
>
> --
> 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 jac...@googlegroups.com.
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/53fd68b0-44fe-4c30-98a4-4d8c6fbef62b%40googlegroups.com.
<Jacoco_part.xml>
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/54A9056A-EED0-42F8-BE5F-42F5DF22F596%40mountainminds.com.
Hey Marc,Actually I created this jacocoTests target newly.
Earlier it was cobertura based so we decided to shift from cobertura to Jacoco.
I am having trouble in getting the code containing @Test annotation to run.
ThanksShekhar
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/53fd68b0-44fe-4c30-98a4-4d8c6fbef62b%40googlegroups.com.
<Jacoco_part.xml>
--
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+unsubscribe@googlegroups.com.