~/talk

TDD with Spring Boot - Testing the Harder Stuff

Talkat Spring I/O 2017 · 2017-05-18..05-19· [testing]
speakerdeck:sannidhi
slides:none on file

Builds a small Spring Boot URL shortener with two endpoints: shorten (returns a hash) and expand (resolves it). Uses Spring Boot Starter Test, MockMvc and @WebMvcTest with @MockBean for controller tests, Mockito and AssertJ for unit tests, @DataJpaTest with H2 to exercise JPA wiring, and proves @Cacheable plus application-level enable caching reduces repository calls to one. Adds RabbitMQ via RabbitTemplate and @RabbitListener to increment click counts and stabilizes the async integration test with awaitility, and all examples end up passing.

AI-written summary · about

  1. 0:00Introduction
  2. 4:51Goal
  3. 10:10URL Shortening
  4. 13:40Databases
  5. 23:15Caching
  6. 26:41Message Broker
  7. 32:42Live Coding
  8. 43:01Pivotal Munich
~/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.