我创建了一个示例项目来使用 gwt-test-utils ( https://github.com/povilasb/gwt-test-utils-sample ) 运行我的 gwt 测试。我正在使用 Ant (1.8.2) 进行构建,包:gwt 2.6、juni 4.11 和 gwt-test-utils 0.47。
不幸的是,我无法运行测试:
html-test-utils-config:
test:
[junit] Testsuite: com.example.gwtTestUtils.client.PersonTest
[junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.006 sec
[junit]
[junit] ------------- Standard Error -----------------
[junit] SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder.
[junit] SLF4J: Defaulting to no-operation (NOP) logger implementation
[junit] ------------- ---------------- ---------------
[junit] Testcase: initializationError(com.example.gwtTestUtils.client.PersonTest): Caused an ERROR
[junit] Error while scanning package 'com.googlecode.gwt.test.internal.patchers'
[junit] com.googlecode.gwt.test.exceptions.GwtTestPatchException: Error while scanning package 'com.googlecode.gwt.test.internal.patchers'
[junit] at com.googlecode.gwt.test.internal.ClassesScanner.scanPackages(ClassesScanner.java:68)
[junit] at com.googlecode.gwt.test.internal.ConfigurationLoader.visitPatchClasses(ConfigurationLoader.java:291)
[junit] at com.googlecode.gwt.test.internal.ConfigurationLoader.<init>(ConfigurationLoader.java:65)
[junit] at com.googlecode.gwt.test.internal.GwtFactory.<init>(GwtFactory.java:91)
[junit] at com.googlecode.gwt.test.internal.GwtFactory.initializeIfNeeded(GwtFactory.java:46)
[junit] at com.googlecode.gwt.test.internal.junit.AbstractGwtRunner.<init>(AbstractGwtRunner.java:30)
[junit] at com.googlecode.gwt.test.GwtRunner.<init>(GwtRunner.java:19)
[junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
[junit] at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
[junit] Caused by: com.googlecode.gwt.test.exceptions.GwtTestPatchException: Cannot find class in the classpath : 'com.googlecode.gwt.test.internal.patchers.AbstractHasDataPatcher'
[junit] at com.googlecode.gwt.test.internal.GwtClassPool.getClass(GwtClassPool.java:27)
[junit] at com.googlecode.gwt.test.internal.ClassesScanner.visitClass(ClassesScanner.java:107)
[junit] at com.googlecode.gwt.test.internal.ClassesScanner.scanClassesFromJarFile(ClassesScanner.java:99)
[junit] at com.googlecode.gwt.test.internal.ClassesScanner.scanPackages(ClassesScanner.java:62)
[junit]
[junit]
[junit] Test com.example.gwtTestUtils.client.PersonTest FAILED
BUILD SUCCESSFUL
Total time: 1 second
似乎有人以前已经遇到过这个问题:https ://code.google.com/p/gwt-test-utils/issues/detail?id=168 。在那里找不到解决方案。
有人对 gwt 2.6 和 gwt-test-utils 4.7 和 ant 有好运吗?