~/talk

Testing and Data Validation Using Generated Code

Talkat GoWayFest 2017 · on Friday, 2017-07-21· [go, testing]
slides:none on file

Demonstrates building and using a new mock generator called minimoc that emits Go mocks as first class function fields, a builder API, concurrent-safe execution counters and finish and wait helpers tied into testing.T. Compares existing tools mockery gomock counterfeiter and an iface extractor, shows live coding of tests that compile and pass, and reports generated test code is about 11x more code than the 30-line service while tests themselves are 3x larger.

AI-written summary · about

  1. 0:00Introduction
  2. 1:52Generating interfaces
  3. 4:05Table test generation
  4. 4:48Mocking dependencies issues
  5. 7:01Introducing minimoc
  6. 14:00Live coding demo
  7. 23:08Debugging the test
  8. 24:13Finishing mock setup
  9. 26:38Storage not found case
  10. 28:25Locator failure case
  11. 31:30Successful case with wait
  12. 34:03Code generation cost
  13. 35:37Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.