初始化 GWT 测试用例执行中的错误



我用maven在GWT中创建了一个带有默认模块的项目,并使用*Test重命名了测试用例类.java并执行了命令mvn包

它未成功执行测试用例,并以测试错误: initializationError(com.gwt.example.project.testing.client.GwtTesttestingTest): com/google/gwt/dev/cfg/Condition.

如果我添加,<mode>htmlunit</mode><htmlunit>IE7</htmlunit> POM,然后gwt:test目标工作正常

如果我尝试通过右键单击在 eclipse 中执行测试用例并作为 GWT Junit 测试运行,它会继续执行而不会停止,

这是在 Eclipse 中执行测试用例时的输出。

Validating newly compiled units
   Ignored 12 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Starting http://10.1.1.2:57354/com.gwt.example.project.testing.testingJUnit.JUnit/junit-standards.html?gwt.codesvr=10.1.1.2:57348 on browser FF3
200 - GET /com.gwt.example.project.testing.testingJUnit.JUnit/junit-standards.html?gwt.codesvr=10.1.1.2:57348 (10.1.1.2) 2449 bytes
logging for HtmlUnit thread
   [WARN] Expected content type of 'application/javascript' or 'application/ecmascript' for remotely loaded JavaScript element at 'http://10.1.1.2:57354/com.gwt.example.project.testing.testingJUnit.JUnit/com.gwt.example.project.testing.testingJUnit.JUnit.nocache.js', but got 'application/x-javascript'.
200 - GET /com.gwt.example.project.testing.testingJUnit.JUnit/com.gwt.example.project.testing.testingJUnit.JUnit.nocache.js (10.1.1.2) 6344 bytes
200 - GET /com.gwt.example.project.testing.testingJUnit.JUnit/hosted.html?com_gwt_example_project_testing_testingJUnit_JUnit (10.1.1.2) 11757 bytes
200 - GET /com.gwt.example.project.testing.testingJUnit.JUnit/gwt/standard/standard.css (10.1.1.2) 26953 bytes
Validating newly compiled units
   Ignored 12 units with compilation errors in first pass.
Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
Module com.gwt.example.project.testing.testingJUnit.JUnit has been loaded
200 - POST /com.gwt.example.project.testing.testingJUnit.JUnit/junithost (10.1.1.2) 434 bytes
All clients connected (Limiting future permutations to: gecko1_8)
200 - POST /com.gwt.example.project.testing.testingJUnit.JUnit/junithost (10.1.1.2) 434 bytes
[WARN] Too many clients: expected 1, found 2
200 - POST /com.gwt.example.project.testing.testingJUnit.JUnit/junithost (10.1.1.2) 434 bytes
[WARN] Too many clients: expected 1, found 3
200 - POST /com.gwt.example.project.testing.testingJUnit.JUnit/junithost (10.1.1.2) 434 bytes
[WARN] Too many clients: expected 1, found 4
200 - POST /com.gwt.example.project.testing.testingJUnit.JUnit/junithost (10.1.1.2) 434 bytes
[WARN] Too many clients: expected 1, found 5
200 - POST /com.gwt.example.project.testing.testingJUnit.JUnit/junithost (10.1.1.2) 434 bytes
你可以

在这里看一个轻量级项目:https://github.com/fastnsilver/gwt-datehandling-example

通过套件运行单个GWTTestCase

一些配置文件已定义,因此请查看自述文件。Maven pom中用于引导GWT测试的大部分内容.xml都是直接从文档中获取的。

相关内容

  • 没有找到相关文章

最新更新