gpt4 book ai didi

java - Jenkins 总是表现出成功 - TestNG、Selenium

转载 作者:行者123 更新时间:2023-12-02 02:55:52 25 4
gpt4 key购买 nike

我是 Jenkins 的新手,我在构建方面遇到了问题。我正在使用 Selenium、Java 和 TestNG 编写 UI 测试。我的问题是 Jenkins 总是显示 Finished: SUCCESS 即使某些测试失败。

    ===============================================
TestAll
Total tests run: 10, Failures: 1, Skips: 0
===============================================

[SSH] exit-status: 0
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: **/testng-results.xml
Did not find any matching files.
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Notifying upstream projects of job completion
No emails were triggered.
Finished: SUCCESS

如何解决我的问题?

最佳答案

我假设您正在构建一个 Maven 项目。要停止测试失败的构建,请转到项目的配置部分,然后转到构建部分并在“目标和选项行”中添加:

-Dmaven.test.failure.ignore=false

如果发现错误,这应该会停止构建。

关于java - Jenkins 总是表现出成功 - TestNG、Selenium,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43090023/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com