Skip to content

May 3, 2015

5

A new release of Serenity BDD is out!

by jfsmart

Serenity 1.0.47 is out, with a host of improvements and bug fixes. Major items include:

  • Serenity will now automatically detect Cucumber and JBehave requirements directory structures and group the tests according. For Cucumber, feature files are considered to be the lowest level, and directories containing these features will be mapped to capabilities. For JBehave, story files are the lowest level, and produce stories. Directories that contain story files will be mapped to features. Directories above this level will be mapped to capabilities.
  • Added a new containsElements() convenience method to the PageObject class.
  • Added a hasClass() method to the WebElementFacade class, to test whether an element has a particular CSS class.
  • Display the stack trace for failing tests in the test reports.
  • Experimental support for JUnit reports – JUnit-compatible XML reports (usable directly by CI servers like Jenkins) are now generated in the target/site/serenity directory, with the prefix SERENITY-JUNIT.
  • Added support for Cucumber feature files written in non-English language when generating the requirements reports.
  • You can access properties from the Sereniy properties file in a JUnit test simply by declaring a member variable of type `EnvironmentVariables`.
  • Fixed a bug causing screenshots to fail to be recorded in some circumstances.
  • Fixed a bug where tests hung if an invalid selector was used.
  • Many other smaller bug fixes and performance improvements.

The Maven archetypes have also been updated. This new version should be completely backward compatible with previous (recent) versions of Serenity, so take it for a spin and let us know what you think!

Advertisements
Read more from Tips and Tricks
5 Comments Post a comment
  1. David Selvaraj
    May 11 2015

    Is there a version of Serenity bdd that is compatible with jdk 1.6? I am getting the following error with trying with 1.6
    java.lang.UnsupportedClassVersionError: net/serenitybdd/cucumber/CucumberWithSerenity : Unsupported major.minor version 51.0

    Reply
  2. Jul 7 2015

    Hi,

    Is there an example showing how to use the Serenity property file using EnvironmentVariables object? I tried this but cant get the property:

    EnvironmentVariables a = new SystemEnvironmentVariables();
    System.out.println(a.getKeys());

    Thanks.

    Reply
    • Jul 7 2015

      If you are in a @Steps class or page object, you can just declare a variable of type EnvironmentVariables and Serenity will instantiate it.

      Reply
      • Jul 7 2015

        Ah OK. What if Im in the Test Class. Is it possible to access the property file? The test class with @RunWith(SerenityRunner.class)

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

You are commenting using your Google+ 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: