- Guide to Testing With the Spring Boot Starter Test
- ingredients of spring boot starter test
- how to exclude a specific dependency or use a different dependency other than the default dependencies
- migration from JUnit 4 to 5
- intro to Mockito
- Introduction to Hamcrest
- Introduction to AssertJ
- Introduction to JSONassert
- Introduction to JsonPath
- A Set of Unit Testing Rules
- A test is not a unit test if:
- It talks to the database
- It communicates across the network
- It touches the file system
- It can't run at the same time as any of your other unit tests
- You have to do special things to your environment (such as editing config files) to run it.
- A test is not a unit test if:
- Maven Setup For Testing Java Applications
- Maven Archetype
- Maven Surefire & Failsafe Plugins
- Maven built-in lifecycles
validate
: validate that our project setup is correct (e.g., we have the correct Maven folder structure)compile
: compile our source code with javactest
: run our unit testspackage
: build our project in its distributable format (e.g., JAR or WAR)verify
: run our integration tests and further checks (e.g., the OWASP dependency check)install
: install the distributable format into our local repository (~/.m2 folder)deploy
: deploy the project to a remote repository (e.g., Maven Central or a company hosted Nexus Repository/Artifactory)
- Java Testing - JUnit 5 Crash Course
- How Spring Boot’s Autoconfiguration Work
- JUnit 5 User Guide
- Five JUnit 5 Features You Might Not Know Yet
- Mockito
- Spring Boot Test Slices: Overview and Usage
- recommended-resources-for-testing-java-applications
- Spring Data JPA Persistence Layer Tests With @DataJpaTest