0
我想用ANT運行Build.xml ..但即使當我的測試用例失敗時,構建輸出顯示爲Build Succesfull,儘管它顯示了哪個測試用例已經失敗,請參見下面的OUPUT: -顯示消息爲ANT構建成功,即使測試用例失敗
Buildfile: C:\Users\UC179797\workspace\My_Framework\Build.xml
compile:
[javac] C:\Users\UC179797\workspace\My_Framework\Build.xml:15: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
run:
[testng] [TestNG] Running:
[testng] C:\Users\UC179797\workspace\My_Framework\testng.xml
[testng] Starting ChromeDriver (v2.9.248315) on port 6722
[testng] log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
[testng] log4j:WARN Please initialize the log4j system properly.
[testng] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[testng] 2
[testng] ===============================================
[testng] Suite
[testng] Total tests run: 2, Failures: 1, Skips: 0
[testng] ===============================================
[testng] The tests failed.
BUILD SUCCESSFUL
Total time: 50 seconds
詹金斯多年平均值顯示「紅點」項目失敗
嗨感謝您的評論....但正因爲如此message.ie「構建全成」,我詹金斯甚至不表明項目的失敗作爲一個即「紅點」 – Kiran 2014-10-03 15:57:38
@Kiran你有沒有嘗試答案中提到的'失敗'任務?此任務的全部目的是導致構建失敗,即輸出將顯示「BUILD FAILED」。 – manouti 2014-10-03 17:04:27