public class TelekanalServiceImplTest extends GWTTestCase {
@Override
public String getModuleName() {
// TODO Auto-generated method stub
return "com.karq.tvkava.tvkavaJUnit";
}
public void testTelekanalService(){
// Create the service that we will test.
TelekanalServiceAsync telekanalService = GWT.create(TelekanalService.class);
ServiceDefTarget target = (ServiceDefTarget) telekanalService;
target.setServiceEntryPoint(GWT.getModuleBaseURL() + "tvkava/telekanalService");
// Since RPC calls are asynchronous, we will need to wait for a response
// after this test method returns. This line tells the test runner to wait
// up to 10 seconds before timing out.
delayTestFinish(10000);
//Test data
Telekanal telekanal = new Telekanal();
telekanal.setNimetus("test");
telekanal.setKirjeldus("see on test");
// Send a request to the server.
telekanalService.saveOrUpdateTelekanal(telekanal, new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
// The request resulted in an unexpected error.
fail("Request failure: " + caught.getMessage());
}
public void onSuccess(Void result) {
// Verify that the response is correct.
boolean isSaved = true;
assertTrue(isSaved);
// Now that we have received a response, we need to tell the test runner
// that the test is complete. You must call finishTest() after an
// asynchronous test finishes successfully, or the test will time out.
finishTest();
}
});
}
}

You'll get this error message if you've had SureFire run a GWTTest as a JUnit test. Since SureFire does not know what to do with GWT code, you'll get this error.

It's best to tell SureFire to ignore all the tests with a given pattern. I name all my GWT tests "SomethingGwtTest.java." This way SureFire ignores them and the GWT test runner from the gwt-maven-plugin picks them up and runs them properly.