Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
388 views
in Technique[技术] by (71.8m points)

rspec - Cuke4Nuke or SpecFlow?

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.

Thanks!

question from:https://stackoverflow.com/questions/2113936/cuke4nuke-or-specflow

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

(I might be biased because I am involved with SpecFlow, but here my thoughts...)

Cuke4Nuke is very close to Cucumber. This promises a lot of advantages:

  • Compatibility
  • Getting new features from Cucumber when Cucumber evolves (at least in theory, but language support is an example for this)
  • Being a real part of the Cucumber community and the Cucumber ecosystem

However this comes also with some potential disadvantages:

  • 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 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 tries to offer the following advantages:

  • 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

As disadvantages of SpecFlow I see currently:

  • 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...

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...