Sunday, May 24, 2020

Moving to JUnit 5

JUnit 5 has been available for several years now. Yet I've seen and heard from many organizations that stubbornly stick with JUnit 4. Yes, it meets their needs, but if they were to make the leap to JUnit 5, they would benefit from all the great new features. And it's not that hard to move forward.

I've attempted to provide a bit of encouragement in the form of a new e-book, "Moving to JUnit 5: Migrating and Using the New Features". It's a breezy guide in two parts:
  1. Moving from earlier versions of JUnit to JUnit 5.
  2. Learning the new JUnit 5 features.
The complete book description is below. I hope you will check it out!

Looking to migrate from JUnit 4 to JUnit 5? Need a quick introduction to new JUnit 5 features?

JUnit 5 brings exciting features and unlocks new styles for writing unit test code in Java. But many projects are still using earlier versions of JUnit and struggling with the decision to move forward. This book will help you make your move to JUnit 5 in two steps:

•Migrating from older versions of JUnit.
•Taking full advantage of JUnit 5.

In the first half of the book, we discuss gradual migration, new annotations, changes to commonly used assertions, and replacing runners and rules with extensions. In the second half, we cover new JUnit 5 features like grouping of assertions, nesting test cases, writing conditional test cases, injecting parameters, and more.

At the end of the book, you will know everything you need to know to confidently move to JUnit 5 and write more modern and fun unit tests.