我写使用GWTTestCase简单的测试,这里是:GWTTestCase给了我一个错误
public class SampleTest extends GWTTestCase {
@Override
public String getModuleName() {
return "path.to.my.one.and.only.Module";
}
public void testSome() {
assertNotNull(null);
}
}
但是当我运行MVN测试,测试失败,下一个错误:
[ERROR] Unable to find type 'java.lang.Object'
[ERROR] Hint: Check that your module inherits 'com.google.gwt.core.Core' either directly or indirectly (most often by inheriting module 'com.google.gwt.user.User')
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.648 sec <<< FAILURE!
我有'com.google.gwt.user.User'在我的模块中。
是的我明白了,就像我说的,我完全有这个模块在My.gwt.xml模块中继承。 – user1289877
提供更多详情。 –
问题出在班上,它必须以“GwtTest”开头。所以我将类的名称更改为GwtTestSampleTest。下一个问题是我必须运行** mvn gwt:test **而不是** mvn test ** – user1289877