尽管测试过去,为什么黄瓜会继续对詹金斯(Jenkins)保持水平



我的黄瓜测试在命令行上效果很好,但是当我在jenkins/hudson连续集成中运行它们时,我会得到以下内容,但不确定如何修复它:

11 scenarios (3 skipped, 3 pending, 5 passed)
78 steps (51 skipped, 3 pending, 24 passed)
0m3.238s
Build step 'Execute shell' marked build as failure
Recording test results
Failed to send e-mail to kamilski81 because no e-mail address is known, and no default e-mail domain is configured
Failed to send e-mail to i.wooten because no e-mail address is known, and no default e-mail domain is configured
Failed to send e-mail to scott.j.rodgers because no e-mail address is known, and no default e-mail domain is configured
Sending e-mails to: dev@sc.com
Finished: FAILURE

我的脚本的最后一行:

cucumber

我被建议添加"退出0",但随后打破了我的Junit报告,因此报告不正确。

我认为Cucumber由于跳过还是由于待处理测试而提供了非零的进程出口代码。尝试使其不运行任何跳过,然后再进行任何待处理,然后进行任何跳过或待处理测试,并查看其提供的出口代码。要查看出口代码(以UNIX为单位),请使用类似的内容来运行它:

cucumber ...args to select tests... ; echo $?

cucumber - 图片标志会导致黄瓜返回出口代码1(例如失败),如果有未决方案。如果有非零退出代码,Jenkins(或任何CI)将失败。

我会检查您项目中是否有cucumber.yml文件,因为这很可能是您的图片隐藏的地方。

最新更新