Hi Shekar, and how did your Ant file look before you added JaCoCo (my question 1)?
Regards, -marc > On 21. Jun 2019, at 17:40, T CHANDRA SHEKHAR 15BEC1185 > <[email protected]> wrote: > > Hey Marc, > > I am actually using ant to build the code base and have integrated Jacoco to > check the coverage and generate the report, the problem is the code base > mostly consists of Functional testing codes, which don't use main but are > rather run using Junit annotations (@Test), I am unable to get the JVM to > execute those @Test methods and get the coverage. > I have attached the part of ant build file which includes Jacoco. > > Thanks > Shekhar > > On Friday, June 21, 2019 at 5:02:09 PM UTC+5:30, Marc R. Hoffmann wrote: > 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 <[email protected] <javascript:>> > > 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 [email protected] <javascript:>. > > To view this discussion on the web visit > > https://groups.google.com/d/msgid/jacoco/d88e5002-0a95-4671-bdb2-9b8912892ba0%40googlegroups.com > > > > <https://groups.google.com/d/msgid/jacoco/d88e5002-0a95-4671-bdb2-9b8912892ba0%40googlegroups.com>. > > > > > -- > 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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jacoco/53fd68b0-44fe-4c30-98a4-4d8c6fbef62b%40googlegroups.com > > <https://groups.google.com/d/msgid/jacoco/53fd68b0-44fe-4c30-98a4-4d8c6fbef62b%40googlegroups.com?utm_medium=email&utm_source=footer>. > <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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/54A9056A-EED0-42F8-BE5F-42F5DF22F596%40mountainminds.com.
