Skip navigation.

Archives

One problem with given-when-then... the answer... "Other Examples Include"

acceptance test patterns

As I've mentioned before, in acceptance test driven development, I use the Given/When/Then structure for writing acceptance tests. This approach is attributed to Dan North and Joe Walnes presentation at XPDay 2006.

For example, let's consider a test for a story around logging in (I know - I always use this but it's something most people have experience of):