Not able to run GWTTestCase in Eclipse

355 views
Skip to first unread message

Michael Zhou

unread,
Feb 12, 2016, 6:02:55ā€ÆAM2/12/16
to GWT Contributors
I have a test under gwt-user/core/test/com/google/gwt/emultest/ that I want to run in Eclipse.
I imported gwt-user and gwt-dev according to trunk/eclipse/README.md.
When I run the test as a JUnit test, I get:

com.google.gwt.junit.JUnitFatalLaunchException: The test class 'com.google.gwt.emultest.java.util.BitSetTest' was not found in module 'com.google.gwt.emultest.EmulSuite'; no compilation unit for that type was seen
at com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:734)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1327)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1283)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:672)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:421)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:247)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

This seems to happen in any GWTTestCase I tried to run.

I also see: Could not find the GWT compiler jarfile. Serialization errors might occur when accessing the persistent unit cache.
from the Eclipse Console.

Daniel Kurka

unread,
Feb 12, 2016, 7:47:38ā€ÆAM2/12/16
to GWT Contributors
Hi Michael,

you are probably missing adding all required source roots to the class pathso that the compiler can find the .java .files.

If you go to your Run Configuration under Classpath, hit adavanced and add all required foldersĀ 

At least you should add:

dev/core/super/
user/src/
user/super/
user/test/
user/test-super/

Hope that helps,
Daniel




--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/d09b3d03-9111-4109-a735-e33b5c0630a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Zhou

unread,
Feb 12, 2016, 9:47:08ā€ÆAM2/12/16
to GWT Contributors
Thanks Daniel, adding

gwt-dev/core/super/
gwt-user/core/src/
gwt-user/core/super
gwt-user/code/testĀ 

works.

Michael
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

Michael Zhou

unread,
Feb 12, 2016, 1:42:37ā€ÆPM2/12/16
to GWT Contributors
Hi Daniel,

Is there a way to print / log stuff / debug when running a GWTTestCase in Eclipse? System.out.println() or breakpoints aren't working for me.

Michael

On Friday, February 12, 2016 at 7:47:38 AM UTC-5, Daniel Kurka wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

Daniel Kurka

unread,
Feb 12, 2016, 4:33:32ā€ÆPM2/12/16
to GWT Contributors
If you want to see the console output use a browser to do so, simply pass this in your args:

-Dgwt.args='-runStyle Manual -style PRETTY -setProperty compiler.stackMode=native -port 5454'

Once the test is compiled it will print a url that you can paste into any browser and run the test there. This will also allow you to do debugging directly in that browser


To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/c851b2a0-f711-407f-8b8e-2b961abc8512%40googlegroups.com.

Thomas Broyer

unread,
Feb 12, 2016, 6:00:24ā€ÆPM2/12/16
to GWT Contributors
Probably something we should put into a README somewhere ;-)

Michael Zhou

unread,
Feb 12, 2016, 9:01:01ā€ÆPM2/12/16
to GWT Contributors
The test still finishes in Eclipse, so when I go to that URL I get an ERR_CONNECTION_REFUSED...
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

Goktug Gokdogan

unread,
Feb 16, 2016, 8:18:04ā€ÆPM2/16/16
to google-web-toolkit-contributors
If you log via java.util.logger at Level.SEVERE, you will see those logs locally.

To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit-contributors/099a6381-a0a8-40c7-906f-2fbe9c91fb5d%40googlegroups.com.

Michael Zhou

unread,
Feb 18, 2016, 1:42:41ā€ÆAM2/18/16
to GWT Contributors
That works. Thanks Goktug!
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit-contributors+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages