Starting out with BDD

22 views
Skip to first unread message

Neil McLaughlin

unread,
Jul 21, 2010, 4:32:23 PM7/21/10
to spec...@googlegroups.com
Hi All

We are just starting out on a greenfield project and are driving our
development from executable acceptance tests using an outside-in/BDD
approach (SpecFlow + nunit + htmlUnit). We were previously using
stories and TDD, but no executable scenarios, as a fairly agile team.

Although we have a long way to go things are going OK at the moment
and we feel it is bringing some real focus to the development process.
However a lot of the early stories are largely admin type CRUD - for
example functionaility to set up user defined entities and their user
defined properties within the system and to provide a mechanism for
relating these entities to each other.

I have read Gojkos excellent blog post on the anatomy of good
acceptance test (http://gojko.net/2010/06/16/anatomy-of-a-good-
acceptance-test/) after having attended the agile testing meeting on
which it is based. Although I thought I understood what makes a good
test where a business rule needs elaborating I am struggling with this
infrastructure stuff - this manifests itself in difficulty in coming
up with the "So that I can ..." bit of the story as the infrastructure
stuff is only there to support the meat of the application which is
capturing entity specific data to support the business.

A lot of the scenarios are of the form:

Given the system doesn't have something
When I create something (using the web interface)
Then visiting a listing page shows the thing I created

I keep in mind that the scenarios are there to facilitate
communication but they seem to state the obvious or do you need to
start with the simple stuff to tease out the edge cases. I am also
aware that some of the tests are tending towards scripts using the
driving the UI.

Does anyone have any advice about how to write tests for this sort of
stuff or any experiences in starting out with BDD they can share.

Thanks in advance

Neil

Cross posted to the agile testing uk

Neil McLaughlin

unread,
Jul 22, 2010, 9:20:03 AM7/22/10
to SpecFlow
The thread on this topic on Agile Testing UK is at
http://groups.google.com/group/agile-testing-uk and has some
contributions.

Simon Keep

unread,
Jul 22, 2010, 10:39:57 AM7/22/10
to spec...@googlegroups.com
Hi Neil,
 
One thought that occurs is that with agile it is usual to be building a small vertical slice through the entire application rather than just working on one layer, therefore as well as having CRUD operations to test you would also have a corresponding UI as well which would then allow your scenarios to be based on the UI behaviour which would of course then initiate the CRUD operations.
 
If this is not possible I would have thought that the scenarios could still be based around the expected user functionality that will cause the execution of the CRUD operation that you are building, even if you are not actually building the UI yet.
 
Si.
 
 

Simon Keep

unread,
Jul 22, 2010, 10:40:50 AM7/22/10
to spec...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages