~/talk

Writing Microservice Integration Tests in Go (Finally)

Talkat GopherCon Singapore 2019 · on Friday, 2019-05-03· [testing, go]
links:none on file
slides:none on file

Claims that integration tests run inside Go by spinning mocked downstream services as goroutines and communicating via gRPC + Go goroutines on the same ports; test code programs mock responses onto interface{} channels and asserts both the returned client response and the exact requests the service sent to mocks. Uses proto-generated clients/servers and optionally generated mocks, lets tests run fast, supports negative test cases and timeouts, and ships example code on GitHub so the pattern is reproducible.

AI-written summary · about

  1. 0:00Intro
  2. 0:40What are microservices?
  3. 1:05How do you test microservices?
  4. 2:04Two Unit Tests And Zero Integration Tests
  5. 3:13Payment Example (End to End)
  6. 4:20End to End Problems?
  7. 5:18How does Go help?
  8. 6:11Payment Example (Integration)
  9. 7:38Let's look at source code
  10. 8:50Integration Test Source (TestMain)
  11. 10:14Integration Test Source (TestPayment)
  12. 12:30Negative Integration Test Source
  13. 13:30Mock Payments Server Source
  14. 15:14Takeaways
~/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.