Hi,
I am using web application which use smart gwt and gwt use for client code. However Client code is written in java. But normal scenario I got 0 coverage for Client code by using clover . Then I search for method which can get client side code coverage of web app which use smart gwt and ant for build tool. I found this answer https://confluence.atlassian.com/display/CLOVER/Using+Clover-for-Ant+with+GWT
But I could not get what it tell? Please advice me how to get client code coverage in smart gwt web application which use ANT as build tool.
Thanks
Hi Dulsara,
As stated in Using+Clover-for-Ant+with+GWT:
You can instrument server-side code only. This is due to a nature of the Google Web Toolkit which translates client and shared parts into a JavaScript. If you try to instrument client code, GWT will search for sources of all referenced classes, including the Clover instrumentation, which will cause a build failure.
You cannot get Clover's code coverage for GWT client code in a normal build. The only thing you could try is to run unit tests without translating Java into JavaScript, e.g. by using GwtTest framework. See Using+Clover+with+the+GWT-maven+plugin.
Cheers
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.