What is the best BDD environment for working with ASP.NET MVC 2 + C # 4?

I just heard about BDD when I watch Scott Guthrie's video in Sweden . One listener asked Scott about how VS2010 and ASP.NET MVC are doing to support BDD.

After that, I look for BDD (Behavior Driven Development) , which focus on the specification more than on unit testing, when compared with TDD (Test Driven Development) . I found some frameworks that work with Ruby and Java. But I do not know any known .NET platform.

Please tell me about the structure of BDD and the outcome of PROs / CON.

PS. The proposed BDD framework should work fine on .NET 4, C # 4.0, and ASP.NET MVC 2.

Thanks,

+7
asp.net-mvc-2 bdd
source share
7 answers

I see that this question already has an answer, and I have not tried NBehave. But we use MSpec (Machine.Specifications) for this rather large Enterprise project, and it works pretty well for us. Very well worth mentioning.

Rob Conieri produced an EXCELLENT BDD learning video where he uses MSpec line by line: (link removed, no longer available, but find it)

Learn more about Rob Conery's MSpec and why it uses it.
http://wekeroad.com/2009/09/21/make-bdd-your-bff-2/ You can also check his other posts with BDD tags.

Pros:

  • Allows you to quickly "crop" your entire story, scene, contexts and specifications without actual code. Let you focus on the general โ€œBehaviorsโ€ that are the goal of BDD !, without worrying about code and compiling it.
  • Creates a REPORTING HTML report with the inscription "<- NOT IMPLEMENTED" next to the encoded specifications. I often pass this report: to the Client (CEO and CTO), The Testers, New Resources, which I bring to the project, and to anyone who wants to know how the software works, without having to show a line of code!
  • TestDriven.NET runners are included in MSpec using the new tdnet binding (no configuration!).
  • The [Behaviors] attribute, along with its Behaves_like type of delegation, copies existing specifications from one scenerio on top of another by using the snap function.

Minuses:

  • There is little to the documentation, although not so much (see the video above). Recently, the author wrote about help with paperwork.
  • Another new, and only a side project from the author (not his main concert). But he is very active in this post.

Hope this helps.

+13
source share

I would recommend trying SpecFlow. It is strange that no one mentioned it. Here's a great article about using BDD with Specflow and Asp.Net MVC open source and hosted on GitHub

The Spec stream uses the GWT (Given When Then) syntax, which I personally really like. So far, we have had great success with BDD, which is now trying to implement using SpecFlow. It is still early, but so far everything is going well.

Pros:

  • Integrates in VS2008 and VS2010 with a good plugin
  • Uses the Popular Filed When Then Dictionary
  • Uses the standard NUnit Test Runner
  • Functional file makes it easy to embed scripts from business analysts

Minuses:

  • the function code behind is a little ugly though nothing wrong
  • As far as I know, the reporting format is pretty limited (I just use NUnit)

I urge you to give it back.

+8
source share

I built StoryQ, deciding that you do not need most of the framework. It is very lightweight, integrates into an existing test runner, check it out at http://storyq.codeplex.com

+6
source share

Have you watched NBehave ? You probably also want to look at this old question . But I would also like to add that IMHO can be made BDD using some kind of unit testing system. A simple direct way is to name your "test class" something like "Given_X", and then let all your "testing methods" have names like "It_should_Y".

+1
source share

Storevil

Very light weight http://code.google.com/p/storevil/

0
source share

Do you know a Goiko Adzic video on how to make BDD in plain English using Concordion.NET ?

http://gojko.net/2009/09/01/acceptance-testing-in-plain-english-with-concordion-net/

0
source share

Try the following: https://www.nuget.org/packages/Heleonix.Testing.NUnit It works with NUnit but provides syntax like Jasmine or Jest in JavaScript in Given / When / Then and Arrange / Act / Assert styles

0
source share

All Articles