Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cucumber alternative for .NET

Tags:

.net

cucumber

Quick one, has anyone come across a library similar to Ruby's cucumber (a human readable DSL for defining use case stories that can be tested against) in the .NET sphere?

like image 235
Owen Avatar asked Jun 10 '09 14:06

Owen


People also ask

What is the difference between Cucumber and Specflow?

Cucumber is an application that reads Gherkin syntax plain text specification files and runs ruby files to execute those specifications. Specflow is a 'port' of cucumber for . net that also uses Gherkin syntax files but wires them up to . net code.

What is Gherkin language?

Gherkin is a language that developers use to define tests in Cucumber. Since this language uses plain English, it's meant to describe use cases for a software system in a way that can be read and understood by almost anyone.


2 Answers

You should also check out SpecFlow, that is an open-source project to do BDD with .NET.

SpecFlow is using the same definition format (Gherkin), like cucumber, but you can write your step definitions in .NET. It basically generates unit-test classes (NUnit, MsTest, xUnit, etc.) from your feature files, so you can use the same unit test execution engine, like you do with the real unit tests. This way it is also easier to integrate the BDD functional tests to the integration build.

In the recent versions SpecFlow has a syntax coloring feature for Visual Studio 2010 and support for Silverlight and Mono/MonoDevelop.

like image 52
Gaspar Nagy Avatar answered Sep 30 '22 16:09

Gaspar Nagy


Sure. It's called Cucumber. There's an example for how to test .NET code in the Cucumber examples directory and documentation on the Cucumber Wiki for both .NET and Mono.

like image 39
Jörg W Mittag Avatar answered Sep 30 '22 16:09

Jörg W Mittag