GWT TestCase执行中的initializationError

时间:2012-11-16 07:30:26

标签: gwt junit gwt-maven-plugin gwttestcase

我使用maven在GWT中创建了一个带默认模块的项目。并使用* Test.java重命名Test Case类并执行命令 mvn package

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

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

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

这是在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

1 个答案:

答案 0 :(得分:0)

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

通过套件运行单个GWTTestCase

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