Chapter 4. Writing Acceptance Tests with Thucydides

4.1. Organizing your requirements

In this section, we look at the things you need to know to write your acceptance or regression tests using Thucydides in more detail. We will also outline a general approach to writing your web-based acceptance tests that has worked well for us in the past.

  1. Define and organize the requirements or user stories you need to test
  2. Write high level pending tests for the acceptance criteria
  3. Choose a test to implement, and break it into a small (typically between 3 and 7) high-level steps
  4. Implement these steps, either by breaking them down into other steps, or by accessing Page Objects.
  5. Implement any new Page Object methods that you have discovered.

Note

These steps should not been seen as a linear or waterfall-style approach. Indeed, the process is usually quite incremental, with requirements being added to the Application class as they are required, and pending tests being used to defined tests before they are fleshed out.