views:

481

answers:

4

If you want to move your development process from Test-Driven Development to Behavior-Driven Development what path would you take or recommend?

What are the possible challenges that you might face? Moving the development process will be a huge task itself as the paradigm changes, a shift happens in the thought process and the outlook of project execution changes.

Did any one had a real experience in making this shift happens smoothly (hmm... may not be so smoothly)?

Or anyone trying to make this shift?

I understand this may not be applied to each and everything. But what would be the logical step in case if someone needs to move towards this.

I have only basic information about BDD from the following SO post. Primary differnce between TDD and BDD

The key points I am looking for are:

  • What kind of developer training is needed?
  • Is there any significant changes in the SDLC process?
  • What are the BDD tools you recommend (.net) ?
  • Good BDD resources (.net)

Thanks in advance.

EDIT:

Regarding BDD Framework for .NET, I came across this post in SO Most Mature BDD Framework for .NET

+2  A: 

As far as I understand... BDD is a new way of looking at TDD. It's more a mental shift than a new technology.

What I mean to say is that you could technically use Unit Testing Tools to do BDD

Allain Lalonde
It's actually not even that (a mental shift, that is): it is more a terminology shift, to align the terminology with the actual mental model. BDD was basically invented, when several leading authors realized that all of their TDD books started with a chapter "This book is not about testing ..."
Jörg W Mittag
A: 

Behaviour Driven Development is a modern Agile Tool that enables your company to reasses the core competencies of the developers in order to find better ways of communication, increasing the interleaving of management vision, that will empower you to efficiently create value on a fundamentally new level of your intrinsic market position.
The mindset switch from Test Driven Development embodies a paradigm shift involving deep workflow analysis, constant feedback through state-of-the-art Agile methodologies, and careful attention to the underlying behaviour scenario transition matrix.

Svante
Bingo! What did I win?
Jörg W Mittag
A: 

You may want to listen to Hanselminutes Show # 146 - Test Driven Development is Design - The Last Word on TDD.

Most interesting thing Scott Bellware says: "Test Driven Development is Design"

The book that made it "turn on" for him: Test-Driven Development in Microsoft® .NET (for .NET developers, listen to the podcast for context)

Grant Wagner
+4  A: 

When I started to look at BDD I investigated all the frameworks out there (for .net) and ended up using none of them. Main reason is I feel like the community hasn't settled on a syntax and best practises yet so instead I continued to use NUnit with a base class based on a blog post by Ben Scheirman. This worked out really well because BDD is not about the tooling but making the tests clean and understandable which is totally possible with normal tools like nunit.

Compared to my old unit tests the new style is much more readable and puts a lot more focus on naming and behavior. We're not that far from printing out the method names and have a discussion with the business people about the system.

Some additional reading by Scott Bellware: Behavior-Driven Development

Examle of a test:

public class WhenAddingLineItemToEmptyOrder : BDDBase
{
    Order order;

    [SetUp]
    public void Arrange()
    {
        order = new Order();
    }

    public void Act() // called by BDDBase
    {
        LintItem item = new LineItem();
        item.Quantity = 1;
        item.Price = 10;
        order.AddLineItem(item);
    }

    [Test]
    public void TotalPriceShouldBeUpdated()
    {
        Assert.AreEqual(10, order.TotalPrice);
    }

    [Test]
    public void OrderCanBeCheckedOut()
    {
        Assert.IsTrue(order.CanBeCheckedOut)
    }
}
Dala