1

I'm learning BDD: how to write effective tests, what to test, and what to leave. I am also struggling with the exact definition of "Behavior" in BDD.

Are there any MVC sample applications with BDD specs to use as a reference?

3 Answers 3

1

CodeCampServer uses BDD style "tests" with NBehave. For example, here is one of their controller test classes.

Sign up to request clarification or add additional context in comments.

Comments

1

Steve Sanderson writes a lengthy blog post on BDD with SpecFlow on an example ASP.NET MVC application.

Comments

1

BDD usually refers specifically to the "Given, When, Then" grammar. This is the style that SpecFlow, NBehave, and, basically, any framework supporting the Gherkin language, provide. And that is,

Given the system is in some state. When I perform some action. Then the system does x -or- is in some new state. 

Tools like MSpec provide what's been called "context specification" grammar. And that looks like

(Establish your initial state... not technically a part of the grammar) When I perform some action It (the system) should do x -or- be in some state 

This naming/grammar argument has been made before by big names like Scott Bellware on the Herding Code podcast and various articles.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.