且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在生产环境中使用 Cucumber + RSpec

更新时间:2023-11-01 09:12:58

我个人不使用 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.