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
- 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:
- The packet structure has not changed.
- The Github location for Serenity BDD is https://github.com/serenity-bdd
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.