This post follows on from the previous (see part 1 and part 2). Here I’ll close out this series of posts by performing a bit more abstraction and finish up with some thoughts about how and to what extent the Cucumber abstraction fits in.
In the first post of this series, I got us set up with a Serenity repository using Maven as our build tool. I also started us on the path of applying Cucumber-JVM by putting a feature file in place. In this post we’ll start tying Cucumber into Serenity’s runtime operations.
I’ve talked a bit about Serenity in previous posts as well as Cucumber-JVM. Here I’ll combine the two and talk about how to set up a simple Cucumber-style project. Along with this focus, I’ll be concentrating a bit more on the Serenity reporting as part of this.
In this post I’ll focus on using page objects in a Selenium and Cucumber JVM context. Please note that this post follows on from the previous post, using the code you built up there.
I previously posted a tutorial on using Cucumber JVM to test Java code. However, many testers are in the position of using Cucumber JVM to test web-based applications using tools like Selenium. In this post I’ll show how to use these tool solutions together.
A lot of testers I run into learn Cucumber on Ruby. This tends to be a very easy path since the overhead on a dynamic language like Ruby is generally pretty low. However, some testers need or want to run Cucumber on the Java Virtual Machine. Yes, you can use JRuby to run the Ruby version of Cucumber on the JVM. But you can also use Cucumber-JVM, which is a port of the Ruby version into Java. However, I find many testers have a hard time getting started with it, particularly if they are coming from Ruby. What follows is the tutorial I wanted and either didn’t find or didn’t look hard enough to find.