NewWork mode: your Claude Code or Codex on work calls, answering from your project's codeSkip to content
Senior0 views

At what point in the work do you write a test?

Practice

AI answer

Tests are worth thinking through as early as the requirements stage: they help clarify the expected behavior. In practice, they are written before or alongside implementation (for example, in TDD), or immediately after a small change while the context is still fresh. Tests are then run locally and in CI whenever changes are made. Testing should not be left until the end of a project: by then, mistakes and unclear requirements are more costly to address.