问题描述
我想决定是否使用Cuke4Nuke或SpecFlow。
每个的pro / cons是什么?对此的意见更好,为什么。
I am trying to decide if I should use Cuke4Nuke or SpecFlow.What are the pro/cons of each? Opinions on which is better and why.
谢谢!
推荐答案
(我可能有偏见,因为我参与SpecFlow,但在这里我的想法...)
(I might be biased because I am involved with SpecFlow, but here my thoughts...)
Cuke4Nuke非常接近黄瓜。
这有许多优点:
Cuke4Nuke is very close to Cucumber.This promises a lot of advantages:
- 兼容性
- 从Cucumber获取新功能(至少在理论上,但语言支持是这方面的一个例子)
- 成为黄瓜社区和黄瓜生态系统的真正组成部分
但是,这也有一些潜在的缺点:
However this comes also with some potential disadvantages:
- / li>
- 由于涉及到更多的基础设施(Ruby,Wire-Protocol,命令行集成...),整个解决方案的复杂性增加,并且链中的某些东西可能会失败上升
- 调试是可能的,但有一点
- dos命令行上的运行方案只是简单的,我仍然有一些字符的问题(德语Umlaute)。在我的情况下,来自Cucumber的无法用于cuke4nuke。
- 与您的持续构建集成是您必须自己解决的问题。
- Ruby is a necessity
- Since more infrastructure (Ruby, Wire-Protocol, command-line integration...) is involved, the complexity of the whole solution rises, and chances that something in the chain is failing rise
- Debugging is possible but a bit of a hassle
- Running scenarios on the dos-commandline is just plain ugly, and I still have problems with some characters (German Umlaute). The solutions from Cucumber did not work for cuke4nuke in my case.
- Integration with your continuous build is something you have to work out for yourself
SpecFlow是一个与Cucumber独立的项目。它试图尽可能接近黄瓜,但有和将会有差距。有计划使用与Cucumber相同的解析器,以提高语言级别的兼容性。
SpecFlow is a separate project from Cucumber. It tries to be as close to Cucumber as possible, but there are and will be gaps. There are plans to use the same parser as Cucumber, to improve compatibility on the language level.
SpecFlow试图提供以下优点:
SpecFlow tries to offer the following advantages:
- 一个纯.NET解决方案(因此不需要安装Ruby,在运行时不涉及Ruby)
- 方案基本上是UnitTests,可以与您现有的基础架构(NUnit.Runners,ReSharper,VisualStudio MSTest Integration ...)一起运行
- 方案和步骤可以轻松地通过VisualStudio调试(只需设置断点)
- 在连续构建中集成应该是一件轻而易举的事情,
- A pure .NET solution (so no installation of Ruby is necessary and Ruby is not involved at runtime)
- There is a basic integration with VisualStudio (and there are plans to evolve this)
- Scenarios are basically UnitTests and can be run with your existing infrastructure (NUnit.Runners, ReSharper, VisualStudio MSTest Integration ...)
- Scenarios and steps are easily debuggable out of VisualStudio (just set a breakpoint)
- Integration in your continuous build should be a breeze, since the infrastructure to run unit-tests is most certainly there already
我现在看到的是SpecFlow的缺点:
As disadvantages of SpecFlow I see currently:
- 它不支持与Cucumber一样多的语言
- 目前有一个代码生成步骤。这在使用VisualStudio时是透明的,并且有一个命令行可以在没有VisualStudio的情况下执行此操作,但很多人不喜欢代码生成。
- 目前没有明确的SpecFlow命令行。
- SpecFlow取决于单元测试框架,目前只支持NUnit和MSTest。
- SpecFlow中的报告功能还不是很复杂。黄瓜确实提供更多的选择,但我不知道他们是否都在cuke4nuke ...
- It does not support as many languages as Cucumber
- Currently there is a "code generation" step involved. This is transparent when using VisualStudio, and there is a commandline to do this without VisualStudio, but a lot of people do not like code-generation.
- Currently there is no explicit commandline runner for SpecFlow. However you can use your unit-test commandline runner.
- SpecFlow depends on a Unit-Test framework, and currently only NUnit and MSTest is supported
- Reporting in SpecFlow is not very sophisticated yet. Cucumber does offer more options, however I don't know if they are all available in cuke4nuke...
这篇关于Cuke4Nuke或SpecFlow?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!