BDD Thucydides is now Serenity

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:

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.

Leave a reply:

Hi Jim — LOL – I forgot about the adult diaper named serenity. But the name does probably fit better for me when I’m whining about the test failing. I love the name Thucydides personally, but you know you might need to re-brand when you have to have a video to help you pronounce the name: https://www.youtube.com/watch?v=ZionYpo2AOs

Leave a reply:

Save my name, email, and website in this browser for the next time I comment.

Comment

Anitha
-
December 31, 2014

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!!

Leave a reply:

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.
Reply

Copyright text 2019 by Joe Colantonio | TestTalks Privacy Policy Disclaimer All the contents of the Blog, EXCEPT FOR COMMENTS, constitute the opinion of the Author and the Author alone; they do not represent the views and opinions of the Author’s employers, supervisors, nor do they represent the view of organizations, businesses or institutions the Author is a part of. Privacy Policy | Sitemap