Tuesday, February 12, 2019

Re: Testing emulated jre classes

You have to create a a subclass of GwtTestCase which requires you to specify a GWT module.

Here an example for java.util.Random emulation within GWT SDK: https://github.com/gwtproject/gwt/blob/master/user/test/com/google/gwt/emultest/java/util/RandomTest.java

Once you run the GwtTestCase using JUnit it will compile the GWT module and execute the test using HTMLUnit. I think by default HTMLUnit will run in FireFox mode. You can find a testing guide at http://www.gwtproject.org/doc/latest/DevGuideTesting.html . It is probably not super up-to-date but it gives you the general idea and shows you how to set parameters to run tests in either HTMLUnit or manually in a real browser.

 -- J.

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

No comments:

Post a Comment