2012-11-16 66 views
0

我使用maven在GWT中創建了一個默認模塊的項目。和更名有* Test.java測試用例類和執行該命令MVN包初始化GWT TestCase執行錯誤

它不是成功執行測試的情況下,並用 試驗在錯誤終止: initializationError(com.gwt.example。 project.testing.client.GwtTesttestingTest):com/google/gwt/dev/cfg/Condition。

如果我添加,<mode>htmlunit</mode><htmlunit>IE7</htmlunit>給廠長,然後gwt:test目標工作正常

如果我嘗試在Eclipse中右鍵點擊執行測試用例,並運行作爲GWT JUnit測試,它一直在不停止執行,

這就是輸出而執行在蝕測試用例。

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 

回答

0

你可能有一個看一個輕量級的項目在這裏:https://github.com/fastnsilver/gwt-datehandling-example

運行通過一套單一GWTTestCase

一些配置文件定義的,所以看看自述。 Maven pom.xml中用於引導GWT測試的大部分內容都直接來自文檔。