~/talk

The power of mocking APIs

Talkat code.talks 2022 · 2022-09-15..09-16· [developer-experience, testing]
slides:none on file

A simple weather app is replaced with a Wiremock standalone server on localhost:8080 that returns stubbed responses so the UI can be tested in isolation. Examples: swapped in a thunderstorm JSON, served an invalid JSON that produced NaN and missing sunrise/sunset, injected a 9000 ms fixed delay, and returned a 500 error that crashed the UI. Setup uses a Wiremock dependency and local stub files; source code and mocks are available on GitHub and the approach proves effective for finding bugs early.

AI-written summary · about

  1. 0:00Introduction
  2. 2:47Weather check app
  3. 8:12Breaking dependencies
  4. 14:25Testing hard scenarios
  5. 17:59Early invalid response detection
  6. 20:50Slow/unresponsive APIs
  7. 22:58Simulating API errors
  8. 24:49APIs not ready
  9. 26:37Mocking beyond web
  10. 28:02Mocking versus end-to-end testing
  11. 28:43Pros and cons
  12. 30:11Summary
~/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.