2016-08-23 94 views
0

我無法在我的eclipse IDE中運行測試用例。當我運行一個或多個測試用例時,我收到以下消息。任何人都可以告訴我解決方案嗎?無法運行TestNG中的測試用例

[RemoteTestNG] detected TestNG version 6.8.9 
    [RemoteTestNG] Invoked with -serport 57601 -protocol json -d F:\encoreworks\maininterface\test-output C:\Users\Admin\AppData\Local\Temp\testng-eclipse--1595370957\testng-customsuite.xml 
    [BaseMessageSender] Waiting for Eclipse client on localhost:57601 
    [BaseMessageSender] Received a connection from Eclipse on localhost:57601 
    [BaseMessageSender] Connection established, starting reader thread 
    [BaseMessageSender] ReaderThread waiting for an admin message 
    [JsonMessageSender] Sending message [GenericMessage suiteCount:1 testCount:1] 
    [BaseMessageSender] ReaderThread received admin message:>ACK 
    [BaseMessageSender] Received ACK:>ACK 
    [BaseMessageSender] Received ACK:>ACK 
    [TestNG] Running: 
     C:\Users\Admin\AppData\Local\Temp\testng-eclipse--1595370957\testng-customsuite.xml 

    [JsonMessageSender] Sending message [SuiteMessage suite:Default suite starting methodCount:0] 
    [JsonMessageSender] Sending message [TestMessage suite:Default suite testName:Default test passed:0 failed:0] 
    [BaseMessageSender] Received ACK:>ACK 
    [BaseMessageSender] Received ACK:>ACK 
    [BaseMessageSender] Received ACK:>ACK 
    [BaseMessageSender] Received ACK:>ACK 
    [JsonMessageSender] Sending message [TestMessage suite:Default suite testName:Default test passed:0 failed:0] 
    [BaseMessageSender] Received ACK:>ACK 
    [BaseMessageSender] Received ACK:>ACK 
    [JsonMessageSender] Sending message [SuiteMessage suite:Default suite ending methodCount:0] 

    =============================================== 
    Default suite 
    Total tests run: 0, Failures: 0, Skips: 0 
    =============================================== 

    [BaseMessageSender] Received ACK:>ACK 
    [BaseMessageSender] Received ACK:>ACK 
+0

可以嘗試更新eclipse testng插件以及TestNG jar到6.9.11 –

+0

Maven Central沒有這樣的版本6.8.9:http://search.maven.org/#search%7Cgav%7C1%7Cg %3A%22org.testng%22%20AND%20a%3A%22testng%22,所以我想知道你是如何擁有這個版本的?你可以更新TestNG到6.8.21(最後的6.8.x)或最新的6.9.12(JCenter上可用) –

+0

你解決了你的問題嗎? – Bohne

回答

0

我有同樣的奇怪的問題,並通過編譯項目和再次運行測試解決它。

說出整個故事: 在我的maven項目中,我刪除了「目標」文件夾並嘗試運行測試。它現在失敗了「無法讀取類上的方法......無法解析類引用....」。

所以通過執行Maven的「package」-goal,我意識到我的pom.xml中有一個失敗(maven-compiler-plugin中的目標版本不過是1.8)。解決這個問題後,我的Maven構建運行沒有問題。隨着新目標摺疊TestNG中的新類再次運行。

相關問題