John Ferguson Smart

John's latest articles

Parallel Test Execution With Cucumber and Serenity BDD

Posted by John Ferguson Smart

Parallel execution is a great way to speed up almost any test suite, but for a long time, running tests in parallel with Cucumber has been challenging. But there is great news on this front: Cucumber 6 supports parallel execution of features in JUnit natively. And if you are using Serenity BDD with Maven, this…

Read More

Improve Your Test Automation Learning And Delivery With The Three Stream Method

Posted by John Ferguson Smart

What are your testing goals for the week? One way I like to prioritise my own goals is to think in terms of streams. The most obvious stream is value. You need to deliver value to your customer. From an agile test automation perspective, for example, this might mean writing relevant automated tests that help…

Read More

Handling Waits and Asynchronous Pages in Serenity BDD

Posted by John Ferguson Smart

Modern web applications are asynchronous by nature. So knowing how to wait for elements, before trying to interact with them, is an essential skill in modern test automation. Many testers pepper their web tests with Thread.sleep() statements, but this is the sub-optimal at best. It slows down the tests, makes them more brittle, and can…

Read More

Learn about Cucumber 4, Java, and Serenity BDD in a new chapter of the Serenity BDD book

Posted by John Ferguson Smart

Cucumber 4 has a lot of new features which can help make our Cucumber test automation code cleaner and more expressive. But there are also some big changes under the hood! Fortunately, Serenity BDD is here to help. The Serenity BDD Book has a brand new and very detailed guide on working with Cucumber 4,…

Read More

Test setup and teardown in Cucumber and Serenity BDD

Posted by John Ferguson Smart

When we write automated acceptance tests we often need to perform some initial tasks to prepare test data or set up the test environment. Likewise, when a test finishes, we often need to tidy up the database or put the environment into a clean state. With Serenity BDD and Cucumber, there are several ways to…

Read More

Serenity Ensure – Fluent Assertions in Serenity Screenplay

Posted by John Ferguson Smart

Assertions are an important part of any test automation framework, and Serenity gives us many options. You can of course use standard JUnit, Hamcrest or AssertJ assertions at any point in a Screenplay test. But more recent versions of Serenity Screenplay provide an alternative approach, which many developers find easier to use and faster to…

Read More

BDD in Action: Advanced BDD Test Automation

Posted by John Ferguson Smart

Join John Ferguson Smart in Madrid this June at Expo:QA and learn the finer points of Advanced BDD Test Automation practices In this workshop with John Smart, author of BDD in Action, you will be introduced to the principles and practices of applying software engineering design practices to test automation, looking at concepts such as…

Read More

Embedding Custom Data in Serenity Reports

Posted by John Ferguson Smart

Executable specification written in Gherkin are a great way both to document an application’s behaviour, and to demonstrate that it works. QA folk can use the generated living documentation to verify both that the feature does what the business expects of it, and that the feature actually works. Because of this, BDD living documentation plays…

Read More

Can you use BDD for legacy applications? Sure you can!

Posted by John Ferguson Smart

A few folk have been asking me about how BDD works with legacy applications. So here are my thoughts. BDD is a collaboration process that involves multiple team members working together with BAs, business or product owners to discover and refine requirements using structured conversations about examples of user and system behaviour. It is an…

Read More

BDD has crossed the chasm

Posted by John Ferguson Smart

In the latest InfoQ Engineering Culture and Methods Report, for the first time, the essential agile practices of Behaviour Driven Development (BDD), Craftsmanship and Coaching/Mentoring appear in the Early Majority category. It is not to soon. High performing organisations and teams have long realised that Scrum alone is not enough. One survey actually found that…

Read More

Running parallel tests in Cucumber with Serenity BDD

Posted by John Ferguson Smart

Running parallel tests in Cucumber with Serenity BDD has always been tricky. Until now. People often ask me how to run their Cucumber/Serenity BDD test suites faster. Fast feedback is key to a smooth build pipeline and to an effective test suite. A quick-running test suite means we can know when something goes wrong, and…

Read More

Running individual scenarios in JBehave or Cucumber with Serenity BDD

Posted by John Ferguson Smart

When we are working with BDD test automation tools such as Cucumber and JBehave, it often comes in handy to run an individual scenario in isolation. In this article, we look at how to do this using Serenity BDD. JBehave In JBehave, you need to use tags to identify the scenario you want to run….

Read More

Sharing state between steps in Serenity BDD

Posted by John Ferguson Smart

Whether you are using Cucumber, JBehave or just JUnit, Serenity BDD encourages a layered, structured approach to automation. The reason for this is simply that it makes the tests easier to understand and maintain, and faster to write in the medium term. But people often wonder what is the best approach to share information between…

Read More

Beyond Page Objects: liberate yourself from the chains of UI-think!

Posted by John Ferguson Smart

So you have Page Objects in your test automation suite? That’s great! But it’s not enough! Page Objects are a great start, but you need to go further if you want truly sustainable, high quality test automation. The Page Objects origin story Page Objects are a popular automated web testing pattern first implemented for Selenium by Simon…

Read More

Don’t let automation sabotage your BDD adoption

Posted by John Ferguson Smart

Test Automation can be a powerful aid for teams adopting Behaviour Driven Development. But do it too early, or in the wrong way, and your efforts can have the opposite effect. We all want to deliver great products. We all want to delight our customers. But sometimes, reality gets in the way, and delivering features…

Read More

The Three “A”s, building blocks for a great test suite

Posted by John Ferguson Smart

Writing high quality automated tests is not easy, especially for manual testers who are relatively new to automation. There is a learning curve. But the cost of not writing high quality test code, both in terms of maintenance and time wasted on unreliable or hard-to-update tests, is unsustainable for any but the smallest project. This…

Read More

A short guide on how to configure ChromeDriver in Serenity BDD

Posted by John Ferguson Smart

Serenity BDD is an open source library that makes it easier to write high quality, maintainable automated acceptance tests. Serenity BDD has strong WebDriver integration, and manages the WebDriver instances for you. You almost never need to create or close your own WebDriver instance. Chrome gives WebDriver developers a great deal of control, with many…

Read More

User-centric and task-driven: a better way to automate

Posted by John Ferguson Smart

Too often, our acceptance tests end up as sequences of “click”s and “select”s running against a web application. This makes our tests hard to understand and hard to maintain. User-centric, task-driven test automation shows us a better way. When we learn something new, it is easy to get stuck in a low-level, details-focused way of…

Read More

Multi-browser and multi-environment testing in Serenity BDD

Posted by John Ferguson Smart

Sometimes we might want to run the same test in different environments, or on different browsers, and still see each test run appear in the reports. The latest version of Serenity BDD allows you to implement multi-browser and multi-environment testing using the notion of contexts. A context is a way of running the same test several…

Read More

Running Serenity BDD tests with Tags

Posted by John Ferguson Smart

Tags are a powerful feature of Serenity, making it much easier to read, understand and navigate through the test reports. But tags also allow you to be more selective about what tests you run. This article shows you how. There are many times when it comes in handy to run just a subset of our…

Read More

© 2019 John Ferguson Smart