Spring I/O

Sessions

Peter Szanto

Unit and component testing Spring Boot based applications [Workshop]

Peter Szanto - BlackRock

This workshop is for developers who want to write unit and component tests with less effort, speed up test execution and get familiar with test tools provided by Spring Boot. Focus will be on testing the following application layers:

- Repository : JDBC / JPA / Spring Data JPA
- RestClient
- Service
- Caching with Spring Cache Abstraction (@Cacheable)
- Controller

Participants will learn the below tools and concepts through hands on exercises:

- Spy / @SpyBean
- Mock / @MockBean
- Stub
- Spring's @Test* annotation
- Speeding up tests by controlling Spring application context
- MockRestServiceServer
- MockMvc
- JacksonTester
- OutputCapture
- JUnit
- TestNG

Requirements: git, jdk 8, your favorite IDE
Repo to clone: https://github.com/ExampleDriven/spring-boot-testing-workshop