Category Archives: bdd

C# mocks in action

Mike and Gabriel both posted comments to show how the Cowhand example in my last post might look and evolve with different mocking frameworks. They’ve used FluentSpec and Rhino Mocks respectively. Thanks, Mike and Gabriel! It was a pleasure to … Continue reading

Posted in bdd | Leave a comment

Given, when, then and examples for classes

Some of us have taken to writing comments in our BDD classes to give us Given, When, Then at a unit level. So, if I’m writing examples for a cowhand, I might write something like this: public class CowhandTest { … Continue reading

Posted in bdd | 9 Comments

Dan and I talk about BDD at Oopsla 2007

Back last year, Vlad Gitlevich kindly made a video of Dan and I talking about BDD. We concentrated almost exclusively on the principles rather than the technology, which means the video is still very relevant. Particularly we talked about how … Continue reading

Posted in bdd, stories | Leave a comment

fail() failed…

Antony Marcano’s written a great post on testing for exceptions in a way which makes the example much easier to read, and keeps the Given / When / Then flow intact. I like this very much, and will be doing … Continue reading

Posted in bdd | 2 Comments

Four ways of handling Givens

A Given is the context in which a feature is used When we write code, we want to know that it works. As developer, I want to know how to tell this before I even start coding, so that I … Continue reading

Posted in bdd | Tagged | 2 Comments

BDD for TDDers

Anthony Bailey and I had a conversation over email about what good, experienced TDDers might get out of BDD. If you’ve been wondering what all the fuss is about, maybe this will help! Thanks, Anthony, for tidying the conversation up … Continue reading

Posted in bdd | Comments Off on BDD for TDDers

JBehave 2, naming tests and developing libraries with BDD

Peter Bell and I had a great conversation over Skype yesterday, which he’s kindly blogged. We covered test names, and also talked about how to develop libraries using BDD. Again, this is how I do things; it’s not necessarily the … Continue reading

Posted in bdd, jbehave | Comments Off on JBehave 2, naming tests and developing libraries with BDD

Do I always write a test?

I’ve just been reading the debate between Bob Martin and Jim Coplien on InfoQ, centred around Bob’s assertion that “nowadays it is irresponsible for a developer to ship a line of code he has not executed in a unit test.” … Continue reading

Posted in bdd | 2 Comments

Bug Driven Development: a danger of delivering the pretty GUIs first

After my last post, Negin and I were quite pleased that we’d got as far as we had. So was our Business Analyst. “So, this story that was estimated at 3 days,” she said. “Can I say it’s only taken … Continue reading

Posted in bdd | Tagged | 3 Comments

BDD: Bug Driven Development

Today, Negin and I paired on a brand new piece of work. “We’ll need to create this domain object,” she said, “and a database table.” “I don’t want to do that,” I said. “I’d rather fix the stuff that’s broken.” … Continue reading

Posted in bdd | Tagged | 13 Comments