Thucydides is a tool that lets you use WebDriver-based unit or BDD tests to write more flexible and more reusable WebDriver-based tests, and also to generate documentation about your acceptance tests, including a narrative description of test, along with the corresponding screen shots, and also high-level summaries and aggregations of the test results.
Let's have a look at one of the most common ways of using Thucydides:
First, you create a model of the features and user stories you intend to implement in the next iteration:
Next, describe your high-level acceptance criteria in business terms. Here, we are using easyb, but you could also use just plain JUnit (and soon, Cucumber, Fitnesse, and other popular BDD tools):
Now, flesh out your acceptance criteria in terms of high level steps (but don't worry about the implementation yet - we are still thinking "what", not "how"). Once this is done, you will have a pending acceptance test.
Or, if you prefer JUnit, you could do this:
Now implement the actual test steps using either WebDriver page objects or other test steps. Here you start thinking about implementation:
Next you will need to implement your page objects, if you are not reusing existing ones (which tends to often be the case). These are almost just run-of-the-mill WebDriver page objects, but with a few enhancements:
Now, when you run your tests, Thucydides will produce a narrative-style report describing not only whether the test succeeded, but what it did:
You can also step through the test from the user's perspective, seeing a sequence of screenshots:
Thucydides also provides nice high-level reporting. Here is a report showing all the acceptance criteria for a particular story:
You can also get a high-level picture of your application, in terms of features, stories and acceptance criteria:
To get an idea of the ideas behind Thucydides, and a general picture of what it does, check out the following presentation:
You can also find more detailed material here:
And more documentation will be coming soon!