~/talk

Advanced Testing Techniques

Talkat GopherCon UK 2019 · 2019-08-21..08-23· [go, testing]
links:none on file
slides:none on file

Shows concrete patterns: three levels of dependency injection for SQL (inject DSN, sql.DB, or a custom store interface), a practical way to override time.Now via package variable for deterministic tests, and why exported channels make tests hard so prefer blocking methods that are cancelable. Recommends not exporting wide library interfaces, instead defining small consumer/producer interfaces (used to replace Sarama/Kafka in tests). Demonstrates parameterized suites swapping Redis and memcache backends, and HTTP tests using httptest.ResponseRecorder and docker-entrypoint-initdb.d for Postgres-backed workflows.

AI-written summary · about

  1. 0:00Introduction
  2. 1:42Why test
  3. 2:33Agenda
  4. 2:50Disclaimer
  5. 3:13Outline
  6. 3:33Dependency Injection
  7. 4:01Dependency Injection Examples
  8. 6:33Time Override
  9. 8:01Channels
  10. 9:39Queue Lib
  11. 10:03Error Handling
  12. 10:51Synchronous Testing
  13. 11:50Interfaces
  14. 12:59Soma
  15. 16:32Benefits
  16. 17:35Parametrize Test Suites
  17. 18:23Example
  18. 20:56Why
  19. 21:34HTTP Server Test
  20. 22:17HTTP Test Package
  21. 24:03TableDriven Testing
  22. 25:03Session Testing
  23. 25:53Database Driven Testing
  24. 26:50Table Driven Testing
  25. 27:30Wrapping Up
~/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.