BDD Thucydides is now Serenity

BDD Published on:
Serenity BDD

After using Thucydides for around a year and training multiple teams across our organization, the number one struggle I experienced was getting everyone to pronounce “Thucydides” correctly. Last week I find out that there has been a rebranding effort.

Henceforth, Thucydides will be known as Serenity.

This is a welcome change because no matter how hard I tried to educate the team, few people could actually pronounce “Thucydides.” In fact, the creator of Thucydides has said that the main reason for the name change was that “primarily, ‘Serenity' is easier for people to pronounce and remember, so it is easier for people to talk about it.”

New BDD Serenity Users

For those that don't know, Serenity (formerly Thucydides) is an open-source tool designed to make writing automated acceptance and regression tests easier.

I like to think of it as a wrapper on top of Selenium WebDriver and JBehave that makes writing JBehave and Selenium testing easier because it abstracts away a lot of JBehave boilerplate code you sometimes need to write.

Serenity has features like:

  • Managing state between steps
  • Screenshots
  • Data-driven tests in JUnit
  • Running tests in parallel batches
  • Spring integration
  • Jira integration

The main benefit of using Serenity is the incredible reports that it automatically generates for your BDD tests. For example — which one looks better?

Standard JBehave report:


And here is the same report produce by Serenity (Thucydides):


Writing BDD at the right level

One area my teams have struggled with is writing their BDD G/W/T .feature files at the right level. Because we work on medical devices, many engineers were writing their BDD at a really low implementation detail level.

Writing BDD in this “imperative steps” style is an anti-pattern and goes against the whole purpose of creating scenarios in the “as a user,” So I was coaching them to create their G/W/T at a more abstract-level, non implementation — like using a more declarative approach.

This was an ongoing struggle last year. Fortunately, Serenity (formally Thucydides) has an extra annotation @step. Used correctly, this allows us to now create higher-level BDD statements without worrying about low-level detail at the G/W/T level. Also, the @step details are written to the report so the implementation details are still captured, but our scenarios are kept implementation free — a true win/win!

Existing Thucydides users

If you're a user of Thucydides, here are some things you need to know. This information is based on information I gleaned from the Google Thucydides message board:

  • No new work will be done on the Thucydides code base.
  • All projects will be migrated over the Serenity code base.
  • The Thucydides artifact names have changed. For example:
    • net.thucydides:thucydides-core becomes net.serenity-bdd:core
    • net.thucydides:thucydides-junit becomes net.serenity-bdd:serenity-junit
    • net.thucydides:thucydides-jbehave becomes net.serenity-bdd:serenity-jbehave
    • This applies to all existing artifact names.

• You will need to update your settings.xml file to add the Serenity plugin group:

<pluginGroup>net.serenity-bdd.maven.plugins</pluginGroup>

Selenium Serenity Now!

Maybe I'm dating myself, but when I hear the term “serenity,” the first thing that comes to mind is the Seinfeld episode where George Costanza's father keeps screaming “Serenity now!” to help keep himself calm whenever he gets frustrated.

So if you happen to hear me screaming “Serenity now!” from my cube whenever a flaky Selenium test starts failing you'll know why.

17 responses to “BDD Thucydides is now Serenity”

  1. Hmmm, from named after a Greek Historian/Philosopher, to being named after a brand of adult diapers and bed pads!

    People are better off LEARNING correct spelling and pronunciation, than taking the lazy way out.

    Slightly biased,
    Jim

  2. Hi Joe, I always use to come across your website whenever I search for something related to test automation. It really helps me getting more information.I have experience using selenium webdriver and one of the agile teams in my organization wants my automation team to help them with their ATDD. They are looking to automate acceptance tests for the service/integration layer of the test pyramid and not for the UI layer. So just wondering if Serenity is a good candidate for us to try ? Can it be used to call application code directly? We have experience using cucumber and webdriver but not the kind of automatic acceptance tests for the service layer. Thanks in advance and a happy New Year!!

  3. We use Thucydides and would like to change to Serenity . When we can do it in a “serendipity-way” (excuse for my bad english).

    • Hi not sure I understand. To make the change from Thucydides to Serenity (I’m using Maven) you need to open your pom.file and change the Thucydides dependencies to the Serenity dependencies. You also need to change the plugins from Thucydides to Serenity. For example under your POM’s you need to change the thucydides.version and thucydides.jbehave.version to serenity.version 1.0.23 and serenity.jbehave.version 1.0.10. Replace all net.thucydides to net.serenity-bdd . Is this the info you are looking for? I’m documented what I’m doing to upgrade my Thucydides project to Serenity and will create a blog post on it if you think that would help.

  4. Is there any documentation that I can use to install serenity with Gradle instead of maven on IntelliJ.

    I am looking for a step by step process to make my life easy.

  5. Wow! I didn’t catch that as a Seinfeld reference. Although I love Seinfeld, to me Serenity will always be a Firefly class space craft. But I really enjoy the picture of Joe shouting “Serenity now!”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Serenity BDD