There was 1 error:
1) testSimple(test.craig.MyTests)com.google.gwt.junit.JUnitFatalLaunchException: The test class 'test.craig.MyTests' was not found in module 'test.craig.App'; no compilation unit for that type was seen
at com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:741)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1360)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1316)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:679)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:421)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:247)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
1) testSimple(test.craig.MyTests)com.google.gwt.junit.JUnitFatalLaunchException: The test class 'test.craig.MyTests' was not found in module 'test.craig.App'; no compilation unit for that type was seen
at com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:741)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1360)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1316)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:679)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:421)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:247)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
On Sunday, 27 April 2025 at 2:54:36 pm UTC+10 Craig Mitchell wrote:
I created a demo project with https://github.com/NaluKit/gwt-maven-springboot-archetype with the params:- modular-springboot-webapp- groupId: test.craig
- artifactId: testing
- module-short-name app: tcAdded JUnit to the client pom:<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>Created a simple test in the client module (in src/test/java/test/craig/MyTests.java):public class MyTests extends GWTTestCase {
@Override
public String getModuleName() {
return "test.craig.App";
}
public void testSimple() {
assertTrue( true );
}
}Tried to run it in IntelliJ, but got the error:com.google.gwt.junit.JUnitFatalLaunchException: The test class 'test.craig.MyTests' was not found in module 'test.craig.App'; no compilation unit for that type was seenTried to compile and run it from the command line:java junit.textui.TestRunner test.craig.MyTestsBut that returned:Error: Could not find or load main class junit.textui.TestRunner
Caused by: java.lang.ClassNotFoundException: junit.textui.TestRunnerI thought I was following the instructions in https://www.gwtproject.org/doc/latest/DevGuideTesting.html but obviously doing something wrong.Any help is much appreciated.
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 view this discussion visit https://groups.google.com/d/msgid/google-web-toolkit/48c6f70f-8712-4a89-8f74-51fd25632d48n%40googlegroups.com.
No comments:
Post a Comment