Code Coverage with Powermock

1,505 views
Skip to first unread message

Daniel Breen

unread,
Mar 26, 2015, 3:33:25 PM3/26/15
to powe...@googlegroups.com
Hello,

I am just wondering if there are any code coverage tools that work nicely with Powermock? I have tested jaCoCo, Clover and cobertura but jaCoCo didn't report mocked classed being used, Cobertura didn't seem to work at all (nothing had coverage) and Clover also only showed non mocked classes being used.

I have the latest version of each coverage library as well as Powermock

Does anyone have a working example of a code coverage library working with Powermock? I currently use ant and its a standalone application

Thanks,
Daniel

Johan Haleby

unread,
Mar 26, 2015, 3:57:09 PM3/26/15
to powe...@googlegroups.com
Unfortunately I don't know but would be interested to know this as well. Have you tried if code coverage works with the Javaagent rule?

--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To unsubscribe from this group and stop receiving emails from it, send an email to powermock+...@googlegroups.com.
To post to this group, send email to powe...@googlegroups.com.
Visit this group at http://groups.google.com/group/powermock.
For more options, visit https://groups.google.com/d/optout.

KARR, DAVID

unread,
Mar 26, 2015, 5:40:10 PM3/26/15
to powe...@googlegroups.com

Although EclEmma doesn’t work with PowerMock tests, I’ve had no particular trouble generating code coverage data for PowerMock tests with Cobertura.  I’ve done this from Ant, and I believe from Maven also.

Reply all
Reply to author
Forward
0 new messages