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/
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...
+ /test
Test.gwt.ml
/client/TestGwtTestCase.java
etc
Just wanted to confirm that adding the src to the classpth in the
junit run configuration solved the problem.
-H