14 Testing beyond JUnit

This chapter covers

  • Integration testing with Testcontainers
  • Specification-style testing with Spek and Kotlin
  • Property-based testing with Clojure

In the previous chapter, we looked at the general principles that guide our testing. Now we’re going to dive deeper into specific approaches to improve our testing for different situations. Whether our goal is cleaner testing of dependencies, better communication in our testing code, or even discovery of edge cases we hadn’t considered, the JVM ecosystem provides many tools to help out, and we will highlight only a few. Let’s start with that ever-present struggle: how to deal with external dependencies effectively when writing integration tests.

14.1 Integration testing with ...

Get The Well-Grounded Java Developer, Second 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.