How to get a full coverage report with Selenium (Webdriver) tests?

1,288 views
Skip to first unread message

yoe...@gmail.com

unread,
Sep 23, 2012, 6:42:17 AM9/23/12
to jac...@googlegroups.com
Hi,

I'm using Webdriver to test UI of our webapp.
I configured Maven to run jacoco agent on a forked Jetty JVM that runs our webapp.
The report includes coverage only for the server code. The client code, however, shows 0% in all modules, and I would like to know if anyone knows how I can configure Jacoco to calculate coverage for the client as well.

Thank you!

Marc R. Hoffmann

unread,
Sep 23, 2012, 10:04:33 AM9/23/12
to jac...@googlegroups.com
Hi,

what is the context you're "client" is running in? JaCoCo can collect
execution data for code running in Java VMs only.

Best regards,
-marc

yoe...@gmail.com

unread,
Sep 24, 2012, 4:56:25 AM9/24/12
to jac...@googlegroups.com
Hi Marc,

The client was created with SmartGWT and the context it runs in is JS through the browser.
I understand that I get only the server coverage because the client does not run on the Jetty JVM (which the Jacoco agent is attached to).
Is there a way to use Jacoco in this context?

I know there are other tools out there (JSCoverage, js-test-driver or using PhantomJS), but I want to combine Jacoco so I can merge its report to the server results (as well as other modules) to have a complete coverage summary during the continuous integration build, without having different reports from different tools.

Thanks for your fast reply,

Yoed

Marc Hoffmann

unread,
Sep 24, 2012, 5:08:02 AM9/24/12
to jac...@googlegroups.com
Hi Yoed,

unfortunatelly JaCoCo works on Java VMs only. So you can collect code
coverage for Unit tests that test your GWT Java classes in the JVM. But
once it has been transformed to Javascript JaCoCo can't help any more.

Best regards,
-marc

yoe...@gmail.com

unread,
Sep 24, 2012, 10:33:47 AM9/24/12
to jac...@googlegroups.com
Hi Marc,

Thanks again for your support!
I'll have to turn to JS coverage tools...

Regards,

Yoed

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages