【问题标题】:Jenkins job is always failing after windows batch command execution script for rerun cucumber tests在重新运行黄瓜测试的 Windows 批处理命令执行脚本后,Jenkins 作业总是失败
【发布时间】:2020-09-30 17:28:34
【问题描述】:

我正在使用 maven build 在 jenkins 作业中运行黄瓜 java 测试,如下所示

在 Windows 批处理命令执行脚本下的 post 步骤完成后,我正在重新运行失败

mvn clean verify -Dcucumber.options="@rerun.txt --tags @Retry1" -Dthreadcount="2"

在这一步之后每次执行失败。我在某处读到,如果我添加以下任何一行,它应该会通过,但每次都会失败。

echo "退出脚本"

真

命令 ||真的

退出 0

还在脚本开头添加了#!/bin/sh

请指教。

【问题讨论】:

  • 请按照论坛规则将您的示例包装在代码标签中,以便更好地了解您的问题,谢谢

标签: shell unix jenkins jenkins-pipeline cucumber-java


【解决方案1】:

由于这应该在 Windows 上执行,您可以尝试

mvn clean verify -Dcucumber.options="@rerun.txt --tags @Retry1" -Dthreadcount="2" & echo note: ignoring exit code

或

cmd /c mvn clean verify -Dcucumber.options="@rerun.txt --tags @Retry1" -Dthreadcount="2" & echo note: ignoring exit code

(抱歉,手头没有带有 Windows 代理的 Jenkins 来测试)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多