Getting Client side code coverage in Smart GWT web applications

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 

1 answer

0 votes

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 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

60 views 3 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you