Home

Awesome

<a id="summary">

Serenity BDD

Gitter Continuous Integration javadoc

That feeling you get when you know you can trust your tests

Serenity BDD is a library designed to make writing automated acceptance tests easier, and more fun.

Learn more about Serenity, and discover tutorials, docs and more, on the official Serenity BDD website

What does it do?

Serenity helps structure your automated acceptance tests in order to make them easier to understand and maintain, and provides great reporting capabilties on top of tools like Cucumber and JUnit. It also provides tight integration with WebDriver and RestAssured, to make both web testing and API testing easier and more efficient.

Serenity works in two ways:

Serenity makes your test cleaner

Serenity provides libraries and patterns that make it easier to write cleaner, more reusable code. It provides tight integration with Selenium WebDriver, and modern testing patterns such as Lean Page Objects, Action Classes, and the Screenplay Pattern. You can learn more about these patterns in this article.

Serenity makes your reports richer

Serenity reports aim to be more than simple test reports - they are designed to provide living documentation of your product. The reports give an overview of the test results:

Serenity Test Summary

But they also let you document your requirements hierarchy, and the state of the acceptance criteria associated with your requirements:

Serenity Requirements Summary

When you use BDD tools like Cucumber or JBehave, Serenity will include the feature details in a format that both team members and business folk can read:

Serenity Feature Details

And if you drill into the details, Serenity will give you a detailed account of how the test played out, including interactions and screenshots:

Serenity Test Details

Found a bug?

You can raise a defect here. Note that this is an open source project, so the fastest way to fix an issue is to fix it yourself and to propose a pull request.

Note that pretty much all current development on the Serenity code base is driven by commercial support contracts. As with any open source project, support is never free - it is just payed for from a volunteer's spare time, through a sponsoring organisation or via a commercial support package. Currently, we have very little bandwidth for issues which are not requested or prioritised by a client with a commercial support package, so if an issue is important to you, your project or your company, a commercial support package is the more effective and most ethical way of getting a fix or implementation done quickly.

We also propose one-on-one troubleshooting sessions to help you get your problems resolved faster.

Some companies and individuals who find that Serenity BDD helps in their daily work choose to give back by sponsoring the project in different capacities. Bug fixes or change requests coming from sponsors are generally prioritised over other requests.

Here are a few tips to make it easier for us to help you:

Give as much context as possible.

Simply saying "The reports don't get generated" will not help us very much. Give as much context as possible, including:

Also, make sure you try with the latest version of Serenity - your bug may already be fixed, and in any case error messages from the latest version will be more relevant when we try to track down the source of the problem.

Use living documentation

It is easier for us to fix something we can see breaking. If someone has to volunteer an hour of there time to reproduce a defect, Start of with one of the Serenity started projects (like this one and add a scenario or test case that both illustrates and describes your issue. If possible, write the test to describe the behaviour you expect, so that it fails when the defect is present, and that it will pass when the defect is fixed.

You can help out by sponsoring Serenity BDD directly here: :heart: Sponsor

Take a look at this article for more information.

Need Commercial Support?

If you are using Serenity for your company projects and need faster or more in-depth support, including training and coaching, why not ask your company to explore our commercial support options? We recognize that businesses have unique needs and require specialized attention. That's why we've designed a comprehensive range of support options tailored to your requirements. Whether it's prioritized tickets for pressing issues, custom Serenity work to integrate seamlessly with your existing systems, or remote mentoring and pair programming sessions to enhance your team's capabilities, we've got you covered. Our packages even include options for unlimited email support and additional live support hours at competitive rates. With monthly and annual payment plans, our support models aim to supercharge your Serenity experience, reducing downtime, accelerating development, and ensuring you get the most value out of your automation efforts. Let's chat and find the right fit for your needs!

Where can I learn more?

Check out Serenity BDD in more detail here:

Learn Online

Release Notes

Release notes are available for major releases:

What is the latest stable version I should use?

The tables below list the latest stable and tested versions of Serenity BDD and other related libraries.

Serenity with JUnit

serenity-coreserenity-maven-pluginSelenium versionRestAssured versionAppium client version
4.2.84.2.84.26.05.5.08.3.0
4.1.34.1.34.18.15.3.18.3.0
4.1.04.1.04.16.05.3.18.3.0
4.0.124.0.124.12.15.3.18.3.0
4.0.14.0.14.12.05.3.18.3.0
3.9.83.9.84.11.05.2.08.3.0
3.6.123.6.124.8.05.2.08.3.0
3.6.123.6.124.8.05.2.08.3.0
3.3.103.3.104.5.25.2.08.2.0
3.3.43.3.44.4.05.1.18.1.1
3.2.43.2.44.1.35.0.18.0.0
3.2.23.2.24.1.24.5.18.0.0
3.1.153.1.154.1.14.4.08.0.0-BETA
3.1.13.1.14.0.04.3.38.0.0-BETA
3.0.53.0.53.141.594.3.37.5.1
2.5.82.5.83.141.594.3.37.5.1
2.5.72.5.73.141.594.3.37.5.1
2.4.512.4.513.141.594.3.37.5.1
2.4.342.4.343.141.594.3.37.5.1
2.4.242.4.243.141.594.3.37.5.1
2.3.122.3.123.141.594.3.27.3.0
2.3.52.3.53.141.594.3.17.3.0
2.3.42.3.43.141.593.3.07.2.0
2.2.122.2.123.141.593.3.07.2.0
2.2.52.2.53.141.593.3.07.2.0
2.2.22.2.23.141.593.3.07.2.0
2.2.02.2.03.141.593.3.07.2.0
2.1.52.1.53.141.593.3.07.2.0
2.1.02.1.03.141.593.3.07.2.0
2.0.902.0.903.141.593.3.07.2.0
2.0.842.0.843.141.593.3.07.2.0
2.0.712.0.713.141.593.3.07.2.0
2.0.692.0.693.141.593.3.07.0.0
2.0.562.0.563.141.593.3.07.0.0
2.0.522.0.523.141.593.3.07.0.0
2.0.482.0.483.141.593.3.07.0.0

Sample project: Serenity JUnit Starter Project.

Cucumber 7 (Serenity 3.1.15 onwards)

serenity-coreserenity-maven-pluginserenity-cucumberCucumber
4.2.84.2.84.2.87.20.1
4.1.34.1.34.1.37.15.0
4.0.124.0.124.0.127.14.0
4.0.14.0.14.0.17.13.0
3.9.83.9.83.9.87.13.0
3.6.123.6.123.6.127.11.0
3.3.103.3.103.3.107.8.1
3.3.43.3.43.3.47.4.1
3.2.43.2.43.2.47.2.3
3.1.203.1.203.1.207.1.1
3.1.153.1.153.1.157.0.0

Cucumber 6

Note: Cucumber 6 is no longer supported in newer versions of Serenity.

serenity-coreserenity-maven-pluginserenity-cucumber6Cucumber
2.5.82.5.82.5.86.10.4
2.5.72.5.72.5.76.10.4
2.4.512.4.512.4.516.10.4
2.4.342.4.342.4.346.10.4
2.4.242.4.242.4.246.10.2
2.3.122.3.122.3.126.9.1
2.3.42.3.42.3.46.6.0
2.3.42.3.42.3.46.6.0
2.2.122.2.52.2.55.6.0
2.2.22.2.22.2.25.6.0
2.2.02.2.02.2.05.5.0

Sample project: Serenity Cucumber Starter Project.

Cucumber 4

Note: Cucumber 4 is no longer supported in newer versions of Serenity.

serenity-coreserenity-maven-pluginserenity-cucumber4Cucumber
2.1.52.1.52.1.24.8.0
2.1.02.1.02.1.04.8.0
2.0.902.0.901.0.294.8.0
2.0.842.0.841.0.214.2.0
2.0.692.0.691.0.184.2.0
2.0.562.0.561.0.154.2.0
2.0.542.0.541.0.144.2.0
2.0.522.0.521.0.144.2.0
2.0.482.0.481.0.124.2.0

Sample project: Serenity Cucumber 4 Starter Project.

Cucumber 2

Note: Cucumber 2 is no longer supported in newer versions of Serenity.

serenity-coreserenity-maven-pluginserenity-cucumberCucumber
2.1.52.1.51.9.502.4.0
2.0.902.0.901.9.492.4.0
2.0.842.0.841.9.482.4.0
2.0.692.0.691.9.452.4.0
2.0.562.0.561.9.402.4.0
2.0.542.0.541.9.392.4.0
2.0.522.0.521.9.392.4.0
2.0.482.0.481.9.372.4.0

Sample project: Serenity Cucumber Starter Project.

Serenity with JBehave

JBehave is not currently supported in the current version of Serenity BDD, and no new development is being done with the Serenity/JBehave integration.

serenity-coreserenity-maven-pluginserenity-jbehaveJBehave
2.0.522.0.521.0.464.5
2.0.422.0.481.0.454.5

Sample project: Serenity JBehave Starter Project.

Version number format

Serenity uses a three-digit version number notation, with the following meaning:

 <major>.<minor>.<build>

The first and second digits are for more significant updates, including new features or important bug fixes. The third is updated automatically for every new release, and is generated by the build process.

Commit message conventions

Commit messages are used to generate the release notes for each release. To do this, we loosely follow the AngularJS commit conventions: for commit messages to appear in the release notes, the title line needs to respect the following format:

  <type>: <message>

where <type> is one of the following:

Also commits can consists of several lines - to include some additional information in relase notes. For example:

feat: A new feature to make something better
now it will be available to call api.function() with additional parameters like api.function(Integer)

it will be included in release notes as:

Please take a look at release notes to find some more examples of mutiline commits.

For more information, read the Contributing guide for this repo.

Starting from version 1.1.26, any commits without one of these prefixes will not appear in the release notes.

Licensing

This distribution, as a whole, is licensed under the terms of the Apache License, Version 2.0

History - Serenity and Thucydides

Serenity was originally called Thucydides, and the package structure still reflects this history. Thucydides is discussed at length in the BDD in Action under the name Thucydides - everything discussed in "BDD in Action" is directly applicable for Serenity except for the artifact names.

Thucydides was renamed Serenity in November 2014, and moving forward, all new work will be done on Serenity. The artifact names reflect this change, e.g.

and so on.