Skip to content

October 28, 2011

Thucydides Release 0.4.17 – Using Thucydides for non-web tests

by jfsmart

A new version of Thucyides is out – version 0.4.17 – with some exiting new features. These include:

  • Support for using Thucydides for backend (i.e. non-web) tests
  • Thucydides archetypes
  • Improved easyb reporting
Let’s take a longer look at the first point. Although Thucydides is very much focused on web testing, not all acceptance tests are web tests, and Thucydides now lets you include non-web tests in your Acceptance Test reporting. Thucydides step libraries no longer need to extend the ScenarioSteps class. Indeed, if they do not deal with web tests, they have no reason to. (If they do use web tests, they can still extend the ScenarioSteps class, but they don’t have to – providing a constructor with a Pages parameter, or just having a field of type Pages, will suffice). For example, the following class could be used to model some backend steps:
public class BackendSteps {

    public void accepts_a_sale_transaction() {...}

    public void should_the_update_mainframe() {...}
You can then use these steps in your Thucydides tests. If your test doesn’t use Selenium 2, you don’t need to use the @Managed or @Pages annotations to define your driver and page object factories: you just need to declare the step library using the @Steps annotation:
public class WorkWithBackendTest {

    public BackendSteps backend;

    public void when_processing_a_sale_transation() {
Alternatively, if you are using easyb, your test might look like this:

using "thucydides"

thucydides.uses_steps_from BackendSteps
thucydides.tests_story ProcessSales

thucydides.tests_issue "#WIKI-1"

scenario "Processing a sales transation", {
    when "the backend processes a sale", {
    then "the mainframe should be updated", {
These tests will now be executed as Thucydides tests and included in the reporting, both at the narrative level (though there are no screenshots of course), and in the overall aggregate reporting:
Read more from Releases, Tips and Tricks

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Note: HTML is allowed. Your email address will never be published.

Subscribe to comments

%d bloggers like this: