How to write good tests?

How to write good tests?

Small talk that I gave to @debitoor guys about practices of writing tests.

F32f547e66f3b6528376d67fdb67008f?s=128

Alexander Beletsky

April 12, 2013
Tweet

Transcript

  1. How to write good tests?

  2. Honestly, I don’t know

  3. But, there are properties of good tests…

  4. … are written before code

  5. … are running very fast

  6. … are helping to find regressions

  7. Writing unit tests is not about code verification

  8. … it’s about code quality and design

  9. Think different Think TDD

  10. Could TDD be applied to everything?

  11. In short, yes code, requirements, ui

  12. Should TDD be applied to everything?

  13. Probably, no simple tasks, prototypes

  14. There are few techniques of writing tests

  15. Classic school Kent Beck, 90’s Inside-Out design Focusing on logic

    (algorithms)
  16. London school Jason Gorman, 00’s Outside-In design Focusing on collaboration

    Mocks
  17. What about integration tests?

  18. They are slow, hard to write, hard to setup… but

  19. … they usually caught most nasty bugs.

  20. None
  21. Maintaining test driven cycle

  22. None
  23. Acceptance test (PO communication) API (integration) tests Utils (units) tests

  24. Thanks, @alexbeletsky