Fluent Assertions with AssertJ

Billy Korando Effective Automated Testing With Spring Series, Java, Series Leave a Comment

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).

White Paper Published: Blockchain for the Enterprise

Keyhole Software .NET, Blockchain, Company News, Java Leave a Comment

The Keyhole team is proud to announce the publishing of a new white paper: Blockchain For The Enterprise. 

While Bitcoin is on the minds of the general public worldwide, blockchain is on the minds of information technology professionals. It is the underpinning technology of the powerful and popular cryptocurrency. What exactly is blockchain and how will it help my business? That is what this white paper seeks to answer.

In the most simple terms, a blockchain is a distributed data system for keeping a ledger of immutable data transactions. We will explore additional complexities through this document, but the simplest way to think of it is a highly distributed transaction log. If you happen to be a developer and you are using Git for source code control, you are already using some of the distributed blockchain elements.

In this white paper, we discuss a number of topics related to blockchain with a particular emphasis on the enterprise. This document will be in three major parts. Part one will include a brief overview and history of blockchain, part two will include a deep technical dive, and the third part is written with the intent to aid managers and executives in their decision making in regards to blockchain…

What’s New in JUnit 5.1

Billy Korando Effective Automated Testing With Spring Series, Java, Series, Technology Snapshot Leave a Comment

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…

Conditionally Disabling and Filtering Tests in JUnit 5

Billy Korando Effective Automated Testing With Spring Series, Java, Technology Snapshot, Testing Leave a Comment

I’m in the middle of several talks on JUnit 5, so it’s safe to say that JUnit has been on my mind lately. In the last article in this series, we covered how to use test interfaces to encourage good behavior.

In this article, we look at the improvements the JUnit team has made to filtering and conditionally disabling tests in JUnit 5….

Encouraging Good Behavior with JUnit 5 Test Interfaces

Billy Korando Effective Automated Testing With Spring Series, Java, Spring, Technology Snapshot, Testing 2 Comments

JUnit 5, released in September of 2017, is the first major release for the popular JUnit testing framework in a little over a decade. I recently presented on JUnit 5 at Lava One Conf in Hawaii in January. If you have heard about JUnit 5, but are not yet familiar with it, you can check out my presentation here, as well as the JUnit 5 User Guides.

While researching for my presentation, one new feature in JUnit 5 really caught my eye was the ability to declare tests on default methods in interfaces. This feature caught my eye because two issues I frequently face are encouraging developers to write automated tests and promoting consistent patterns across the enterprise. In this article we are going to look at how test interfaces can help accomplish both of these goals.