Last updated July 26, 2011 22:00, by johnsmart
== What is Thucydides ==
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.
== How does it work ==
Let's have a look at one of the most common ways of using Thucydides:
=== 1) What are you working on? ===
First, you create a model of the features and user stories you intend to implement in the next iteration:
=== 2) How do you know it's done? ===
Next, describe your high-level acceptance criteria in business terms. Here, we are using <strong>easyb</strong>, but you could also use just plain JUnit (and soon, Cucumber, Fitnesse, and other popular BDD tools):
=== 3) Details, details ===
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:
=== 4) Implement the steps ===
Now implement the actual test steps using either WebDriver page objects or other test steps. Here you start thinking about implementation:
=== 5) Implement the Page Objects ===
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 <em>almost</em> just run-of-the-mill WebDriver page objects, but with a few enhancements:
=== 6) Check out the reports! ===
Now, when you run your tests, Thucydides will produce a narrative-style report describing not only whether the test succeeded, but what it did:
=== 7) And the pretty pictures ===
You can also step through the test from the user's perspective, seeing a sequence of screenshots:
=== 7) Don't forget the high-level view ===
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:
== Learning more ==
To get an idea of the ideas behind Thucydides, and a general picture of what it does, check out the following presentation:
[http://www.slideshare.net/wakaleo/completing-the-circle-automated-web-tests-as-a-team-communication-tool Completing the circle - Automated web tests as a team communication tool ]
You can also find more detailed material here:
* Detailled documentation on how to set up your development environment can be found at [https://github.com/thucydides-webtests/thucydides/wiki/thucydides-webtests/thucydides/wiki/Setting-up-your-environment Setting-up-your-environment]
* To get started, work through the [https://github.com/thucydides-webtests/thucydides/wiki/Getting-Started Getting-Started] page.
* [https://github.com/thucydides-webtests/thucydides/wiki/Thucydides-Tutorial Thucydides-Tutorial] (work in progress) goes into more detail.
* Then learn about how to do [https://github.com/thucydides-webtests/thucydides/wiki/Data-driven-tests-in-Thucydides Data-driven tests in Thucydides] as well as [https://github.com/thucydides-webtests/thucydides/wiki/Data-driven-testing-with-CSV-files-in-Thucydides Data-driven testing with CSV files in Thucydides.