This repository contains the source code for the book 30 Testing Tools & Libraries Every Java Developer Must Know.
Testing is a critical part of software development, and having the right tools can make all the difference.
This book introduces you to 30 essential testing tools and libraries, carefully selected to cover a wide range of testing needs—from unit testing and assertions to mocking, integration testing, and performance testing.
Each tool is presented in a cookbook-style format, with clear explanations and hands-on examples that you can apply directly to your projects.
- Enrich your testing toolbox with 30 carefully curated tools and libraries.
- Choose the right tool for the job by understanding the strengths and use cases of each.
- Explore the Java testing ecosystem through practical, real-world examples.
- Apply testing best practices to your Spring Boot, Jakarta EE, or any Java application.
- Gain hands-on experience with each tool through dedicated examples and exercises.
The book is now complete with 30/30 tools and libraries covered.
You can grab your copy here.
This repository contains the source code for the examples used in the book. The examples are organized into two projects:
spring-boot-example
: Demonstrates testing tools and libraries in the context of a Spring Boot application. You'll find most of the code examples here.jakarta-ee-example
: Showcases testing tools and libraries using a Jakarta EE application.
Each tool and library has its dedicated Java package within the spring-boot-example/src/test/java/de/rieckpil/blog
directory of the respective project.
The only exception is MicroShed Testing, which is part of the jakarta-ee-example project.
Requirements:
- Java 21: Verify with
java -version
- A running Docker engine:
docker info
Build the project and run all tests with:
cd spring-boot-example
./mvnw verify
cd jakarta-ee-example
./mvnw verify
- JUnit 4
- JUnit 5
- TestNG
- Spock
- AssertJ
- JsonPath
- Hamcrest
- XMLUnit
- JSONAssert
- REST Assured
- Mockito
- WireMock
- MockWebServer
- Testcontainers
- LocalStack
- MicroShed Testing
- GreenMail
- Selenide
- Selenium
- JGiven
- Pact
- Diffblue
- Pit
- Instancio
- ArchUnit
- Awaitility
- Gatling
- ApacheBench
- JMH
- JfrUnit