【发布时间】:2014-10-03 23:59:47
【问题描述】:
我正在尝试使用 ANT 运行 Build.xml。但即使我的测试用例失败,构建输出也会显示为 Build Succesfull,尽管它显示了哪个测试用例失败,请参阅以下输出:-
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
即使项目失败了,Jenkins 也不显示“红点”
【问题讨论】: