Trouble running the GWT JUnit test cases via Eclipse

19 views
Skip to first unread message

Shrivallabh

unread,
Aug 1, 2007, 9:14:15 AM8/1/07
to Google Web Toolkit
Hi all,

I referred to the following article to run unit test cases.

http://thediscoblog.com/2007/04/28/3-steps-to-running-gwt-junit-tests-in-eclipse/

I am getting the following error.

Getting bytecode for
'com.pav.console.ui.widgets.tree.test.DemoTreeTest'
[WARN] Unable to find compilation unit for type
'com.pav.console.ui.widgets.tree.test.DemoTreeTest'
Getting bytecode for 'com.pav.console.ui.widgets.tree.test
$DemoTreeTest'
[WARN] Unable to find compilation unit for type
'com.pav.console.ui.widgets.tree.test'
Getting bytecode for 'com.pav.console.ui.widgets.tree$test
$DemoTreeTest'
[WARN] Unable to find compilation unit for type
'com.pav.console.ui.widgets.tree'
Getting bytecode for 'com.pav.console.ui.widgets$tree$test
$DemoTreeTest'
[WARN] Unable to find compilation unit for type
'com.pav.console.ui.widgets'
Getting bytecode for 'com.pav.console.ui$widgets$tree$test
$DemoTreeTest'
[WARN] Unable to find compilation unit for type
'com.pav.console.ui'
Getting bytecode for 'com.pav.console$ui$widgets$tree$test
$DemoTreeTest'
[WARN] Unable to find compilation unit for type 'com.pav.console'
Getting bytecode for 'com.pav$console$ui$widgets$tree$test
$DemoTreeTest'
[WARN] Unable to find compilation unit for type 'com.pav'
Getting bytecode for 'com$pav$console$ui$widgets$tree$test
$DemoTreeTest'
[WARN] Unable to find compilation unit for type 'com'
[ERROR] Unable to load module entry point class
com.pav.console.ui.widgets.tree.test.DemoTreeTest (see associated
exception for details)
java.lang.ClassNotFoundException: com$pav$console$ui$widgets$tree$test
$DemoTreeTest
at
com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:
342)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at
com.google.gwt.dev.shell.ModuleSpace.loadClassFromSourceName(ModuleSpace.java:
523)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:325)
at
com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:
326)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access
$200(BrowserWidgetIE6.java:36)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:
70)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:
125)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:
293)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:
196)
at
org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:
117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:689)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:442)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:167)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:
194)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:114)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:
128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
196)
[ERROR] Failure to load module
'com.pav.console.ui.widgets.tree.DemoTree'
com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:367)
at
com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:
326)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access
$200(BrowserWidgetIE6.java:36)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:
70)
at
com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:
125)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:
293)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:
196)
at
org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:
117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:689)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:442)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:167)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:
194)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:114)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:
128)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
460)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:
673)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:
386)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:
196)


The build path seems ok as per the tutorials/

charlie...@gmail.com

unread,
Aug 1, 2007, 10:47:31 AM8/1/07
to Google Web Toolkit
Are you sure you have the source in the classpath, as step 3 in that
tutorial explains? I use Eclipse to runs tests and that is really the
only tricky part (you also have to have any additional libs you are
using in the classpath, but that is normal).

Also does your test run outside of Eclipse?

Try maybe a simple test first, create one with JUnitCreator, compile
it, run it, make sure you understand all the parts there, and then try
to run that same simple test in your IDE. By looking at the scripts
ApplicationCreator and JUnitCreator output you can see all the
necessary paths and elements.

On Aug 1, 9:14 am, Shrivallabh <shrivall...@gmail.com> wrote:
> Hi all,
>
> I referred to the following article to run unit test cases.
>

> http://thediscoblog.com/2007/04/28/3-steps-to-running-gwt-junit-tests...

mP

unread,
Aug 1, 2007, 8:10:20 PM8/1/07
to Google Web Toolkit
I personally find its a good idea to include client/server sub
packages under your test package.

+ /test
Test.gwt.ml
/client/TestGwtTestCase.java

etc

ethael

unread,
Aug 13, 2007, 5:29:28 AM8/13/07
to Google Web Toolkit
I have the same problem... can anyone tell what is wrong? probably
gwt.xml file.... hm?

hugo.a...@gmail.com

unread,
Sep 14, 2007, 10:00:44 AM9/14/07
to Google Web Toolkit
Hi

Just wanted to confirm that adding the src to the classpth in the
junit run configuration solved the problem.

-H

Reply all
Reply to author
Forward
0 new messages