3 JUnit architecture

This chapter covers

  • Demonstrating the concept and importance of software architecture
  • Comparing the JUnit 4 and JUnit 5 architectures

Architecture is the stuff that’s hard to change later. And there should be as little of that stuff as possible.

--Martin Fowler

So far, we have broadly surveyed JUnit and its capabilities (chapter 1). We’ve also looked at JUnit core classes and methods and how they interact with each other, as well as how to use the many features of JUnit 5 (chapter 2).

This chapter looks at the architecture of the two most recent JUnit versions. It discusses the architecture of JUnit 4 to show where JUnit 5 started, where the big changes are between versions, and which shortcomings had to be addressed. ...

Get JUnit in Action, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.