为什么黄瓜保持对jenkins,虽然测试通过? [英] Why does cucumber keep failling on jenkins, although tests pass?

查看:277
本文介绍了为什么黄瓜保持对jenkins,虽然测试通过?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的黄瓜测试工作以及在命令行上,但是当我在詹金斯/ Hudson持续集成运行它们,我得到的下面,但我不知道如何解决它:

My cucumber test work well on command line, but when I run them in Jenkins/Hudson continuous integration, I get the following, but am not sure how to fix it:

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报告,所以报告不正确。 / p>

And i was advised to add 'exit 0' but then this breaks my Junit reports, so reporting is incorrect.

推荐答案

我认为cucumber给出非零的进程退出代码,因为跳过或因为挂起的测试。尝试让它不运行任何跳过,然后任何挂起,然后任何跳过或挂起的测试,并看到它给出了什么退出代码。要查看退出代码(在Unix中),请运行它:

I think cucumber gives non-zero process exit code either because of skipped or because of pending tests. Try to get it to not run any skipped, then any pending, then any skipped or pending tests and see what exit codes it gives. To see the exit code (in Unix), run it with something like:

cucumber ... args选择测试...; echo $?

这篇关于为什么黄瓜保持对jenkins,虽然测试通过?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆