Small talk that I gave to @debitoor guys about practices of writing tests.
How towrite good tests?
View Slide
Honestly,I don’t know
But, there arepropertiesof good tests…
… are writtenbefore code
… are runningvery fast
… are helpingto find regressions
Writing unit testsis not aboutcode verification
… it’s about codequality and design
Think differentThink TDD
Could TDD beapplied toeverything?
In short, yescode, requirements, ui
Should TDD beapplied toeverything?
Probably, nosimple tasks, prototypes
There are fewtechniques ofwriting tests
Classic schoolKent Beck, 90’sInside-Out designFocusing on logic (algorithms)
London schoolJason Gorman, 00’sOutside-In designFocusing on collaborationMocks
What aboutintegration tests?
They are slow,hard to write, hardto setup… but
… they usuallycaught most nastybugs.
Maintaining testdriven cycle
Acceptance test (PO communication)API (integration) testsUtils (units) tests
Thanks,@alexbeletsky