为什么黄瓜在詹金斯上总是失败,尽管测试通过了? [英] Why does cucumber keep failling on jenkins, although tests pass?

查看:22
本文介绍了为什么黄瓜在詹金斯上总是失败,尽管测试通过了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的黄瓜测试在命令行上运行良好,但是当我在 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

有人建议我添加exit 0",但这会破坏我的 Junit 报告,因此报告不正确.

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 来选择测试... ;回声 $?

这篇关于为什么黄瓜在詹金斯上总是失败,尽管测试通过了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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