Unable to execute @Test annotation method through jacoco in ant

22 views
Skip to first unread message

divyansh agrawal

unread,
Jun 22, 2019, 6:03:48 AM6/22/19
to JaCoCo and EclEmma Users
Hello,
I am Currently trying to integrate jacoco Coverage Tool to my code base but i am unable to get the report of it because it is showing that main method is not found in your .java file.So is there any to execute @Test annotation method through jacoco and ant and get the required coverage report of it.

Thanks
Divyansh  

Marc Hoffmann

unread,
Jun 22, 2019, 7:02:53 AM6/22/19
to jac...@googlegroups.com
Exact same question was asked yesterday:


Are you working on the same assignement? ;)
--
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/0b0462e8-22cd-4a77-84bf-dbbe89363a57%40googlegroups.com.

divyansh agrawal

unread,
Jun 22, 2019, 7:35:20 AM6/22/19
to JaCoCo and EclEmma Users
No

divyansh agrawal

unread,
Jun 22, 2019, 7:36:33 AM6/22/19
to JaCoCo and EclEmma Users
No I Just want to execute the test case method and get the report of it.Thats it.


On Saturday, 22 June 2019 15:33:48 UTC+5:30, divyansh agrawal wrote:

Evgeny Mandrikov

unread,
Jun 22, 2019, 3:22:58 PM6/22/19
to JaCoCo and EclEmma Users
Based on what you wrote, in absence of any details about your Ant script, one can only suggest you to read documentation - https://www.jacoco.org/jacoco/trunk/doc/ant.html

Did you tried to do that? It contains example for JUnit:

<jacoco:coverage>
    <junit fork="true" forkmode="once">
        <test name="org.jacoco.examples.HelloJaCoCoTest"/>
        <classpath>
            <pathelement location="./bin"/>
        </classpath>
    </junit>
</jacoco:coverage>

Or one can also suggest to use Google. There are plenty of examples in internet - https://itaffinity.wordpress.com/2012/06/05/generating-and-customizing-junit-and-code-coverage-reports-with-ant/
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages