Writing sustainable automated tests
summary
Explains why sustainable tests must resist refactoring and gives concrete choices: use unit kernel functional tests in Drupal, mock at most one or two dependencies in unit tests, use kernel tests when database/bootstrap is required, and use Behat/functional tests for browser flows. Notes a real rollout at a company with ~1,000 tests (few unit tests, many kernel/functional) and recommends Prophecy for mocking. Cites a Microsoft study: 15–30% more time to add tests but 29% fewer defects after testing and up to 91% fewer with TDD.
AI-written summary · about
chapters (9)
- 0:00Introduction and speaker intro
- 2:53Software development as a craft
- 5:22What code to test and avoid
- 7:06Unit kernel and functional tests
- 10:40Dependencies and test types
- 17:09Design infrastructure vs domain code
- 24:57Test-driven development approach
- 28:53Time investment and benefits of testing
- 33:04Q&A on testing challenges
