~/talk

Test Driven Development with Spring Boot - Sannidhi Jalukar, Madhura Bhave

Talkat SpringOne Platform 2017 · 2017-12-04..12-07· [testing, developer-experience]
speakerdeck:sannidhi
github:mbhave
slides:none on file

Top-down TDD builds a small car service from an integration test down to controller, service and repository, using spring-boot-test with TestRestTemplate, @WebMvcTest + MockMvc, Mockito for unit tests and @DataJpaTest with TestEntityManager so database queries actually flush and reveal missing default constructors and IDs. Caching tests run with @EnableCaching and AutoConfigureTestDatabase and assert the repository is invoked only once. Reactive variant uses WebFlux, WebTestClient and StepVerifier. Live code is on GitHub and most tests go green. TestEntityManager flushes to DB assertJ and Mockito used throughout

AI-written summary · about

  1. 0:00Introduction
  2. 3:10Integration Test
  3. 10:07Controller Test
  4. 12:53Web MVC Test
  5. 14:16Slice Test
  6. 17:40Corner Test
  7. 19:32Exception Handling
  8. 20:32Service Test
  9. 23:18Unit Test
  10. 25:31Data JPA Test
  11. 27:59Spring Data Repository
  12. 31:15Test every line of code
  13. 34:07Test Entity Manager
  14. 44:49Cache
  15. 48:37Data
  16. 51:21Application
  17. 53:57Car Deposit
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.