在生产环境中使用 Cucumber + RSpec [英] Using Cucumber + RSpec in a production environment

查看:21
本文介绍了在生产环境中使用 Cucumber + RSpec的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您在生产环境中使用过 Cucumber 吗?

Have you used Cucumber in a production environment?

你在使用它时发现了什么问题?

What problems did you find using it?

你会推荐我使用它吗?

我目前正在学习将 Cucumber 与 RSpec 结合使用,我正在权衡 Pro 和 Con 在即将进行的项目中使用它的情况,并希望得到一些意见.我将使用 RSpec,但我想知道使用 Cucumber 是否值得花费额外的时间来编写测试.

I'm currently learning to use Cucumber with RSpec, I'm weighing up Pro's and Con's for using it in upcoming projects and would like some input. I will be using RSpec but I'm wondering if using Cucumber will be worth the extra time taken to write the tests.

额外信息:

  • 我不直接与客户打交道;但是我确实在一个团队中工作,并且与没有太多技术知识的项目经理打交道,所以我认为 Cucumber 测试的可读性会被证明是有用的

  • I don't deal with clients directly; however I do work in a team and deal with project managers who don't have much technical knowledge so I thought the readability of Cucumber tests would prove useful

项目规模中等到大型,项目可以有多个阶段,我们会维护它们

The project sizes are medium to large, projects can have multiple phases and we maintain them

时间限制非常严格,但我认为额外的测试覆盖率有望捕获更多错误,从而减少总体时间

Time restrictions are pretty tight however I’m thinking the extra test coverage would hopefully catch more bugs reducing time overall

任何信息都会很棒

干杯

推荐答案

我个人不使用 Cucumber.

Personally I don't use Cucumber.

我想有很好的用例,但我发现编写简单的英语cukes"的想法 - 然后我必须基本上编写 ruby​​ 正则表达式,以便将简单的英语测试变成可以运行太多的 ruby开销.也就是说,如果您有业务分析师甚至客户能够编写测试,那么 Cucumber 就很棒,因为他们会写英文,而您只需要担心使其工作.

I imagine there are great use cases but I find the idea of writing plain english 'cukes' - that I then have to essentially write ruby regular expressions for to turn the plain english tests into ruby that can be run just too much of an overhead. That said, if you have business analysts or even the customer able to write tests then Cucumber is great since they can write english and you just have to worry about making it work.

我们选择使用直接构建在 Rspec2 和 Capybara 之上的 Steak,让我们编写直接的 ruby​​ 测试,我们认为这些测试具有描述性,没有额外的开销.

We've opted to use Steak which is built straight on top of Rspec2 and Capybara and lets us write straight ruby tests which we feel are just as descriptive without the extra overhead.

这篇关于在生产环境中使用 Cucumber + RSpec的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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