3.4. Structure your test using Given/When/Then

A standard template for organizing structuring tests is given/when/then[3]:

This structure is readily understood by non-technical business users, and helps them (and the team) focus on the point of the test.

In terms of mechanics, one approach is to put the "given" into the setup page for a test, with the "when" and the "then" in separate pages. Alternatively, as the archetype does (see Chapter 2, Using the FitNesse Archetype), you could separate out the "given", the "when" and the "then" into a hierarchy of pages.



[3] As first described, I believe, by Dan North in a blog post, Introducing BDD.