As discussed in a previous blog post, Selenium is a popular choice for automation testing, and when you pair it with Cucumber, you unlock even more benefits. By writing test cases in Cucumber’s human-readable format, teams can improve clarity, boost maintainability, and make collaboration easier — even for non-technical stakeholders. In this post, I’ll walk you through how to integrate Cucumber with Selenium to create efficient, effective tests that set your team up for success.
Getting Started with Selenium Automation
Automated testing is a great way to ensure that any application can continue to grow and change while still giving fast and practical feedback to developers. This feedback can tell developers whether or not the changes introduced meet the requirements of the product and don’t introduce bugs.
As discussed in a previous blog series, automated testing can be a valuable resource when trying to deliver both agile and maintainable applications. But where should you get started and what technologies should you use to build automated tests?
In this post, I will discuss how to get started with and how to build out a simple automated test in one of the most popular options: Selenium.
Why Am I Writing This Test?
… The highlight of this episode for me was when Dan laid out the three major concerns of automated tests. I hadn’t previously heard all the major purposes for automated testing laid out in such a succinct fashion. They are paraphrased:
Using Tests to Specify the Requirements of the System
Using Tests to Document the System
Using Tests to Build Confidence in the System
With purpose in mind, it is good practice for both developers and automated testers to ask themselves the following questions when writing a test: Why am I writing this test? Am I specifying system requirements? Documenting system behavior? Building confidence in the system? I’m a firm believer that asking the right questions when writing tests can lead to a better design for individual tests, in addition to more coherent and effective automated test suites.
In this article, we look into the three major purposes for writing automated unit tests. We discuss how they should be approached and what developers and automated testers can do right now to establish better, more purposeful, practices.
Fluent Assertions with AssertJ
I recently gave a presentation to my Keyhole team members about JUnit 5. I started off the presentation by covering the importance of automated testing, how lack of automated testing affects an organization’s ability to deliver code to production, and how without automated testing you are building legacy.
I pointed out two key benefits of automated testing: confidence you are fixing what you set out to fix, and confidence you are not introducing a new bug. A co-worker however pointed out an important third benefit of automated testing: providing living documentation.
My co-worker made the very good point that automated testing can do more than just checking for code correctness. It can also provide valuable documentation for current and future developers on a project.
In this article, we look at how using AssertJ can make automated tests easier to read and write. We take a look at how AssertJ improves the readability of assertions in test cases, as well as how it helps make the task of comparing complex objects and performing list validations easier to read and write. The goal is that when tests are easier to read and write, it will hopefully encourage developers to write more tests (i.e. documentation).
What’s New in JUnit 5.1
It is hard to believe that JUnit 5 has been out for five months! Already we have our first feature release. There are quite a few changes in 5.1 and you can see them all in the release notes. In this article, we focus on a few of the changes that I think are the most impactful to the day-to-day tasks of writing automated tests…










