Agile Development – Can It Work Without Unit Tests?

agiletddunit testing

Does it make sense to talk about "agile development" or claiming that you are applying an "agile methodology" if the code base you are working on has 0% unit test coverage? (And you, as a team, are not doing anything about it).

To make it clear: to me, it doesn't make sense. In my personal experience I found that unit tests are the only tool that allows you to really be "agile" (i.e. respond to changes, improve your design, share knowledge, etc…) and TDD is the only practice that takes you there.

Maybe there are some other ways, but I still cannot see how they can possibly work.

Best Answer

To be pedantic, nothing in the Agile Manifesto or the Scrum Guide make any reference to technical practices, like unit testing or TDD, at all. So, yes, in theory you could deliver early and often with a focus on collaboration and value without them and call yourself Agile, you might even actually have agility.

In practice however, it's nearly impossible to consistently deliver value (into production) every few weeks without a good test suite. This includes integration tests as well as unit tests. Unit tests only go so far. There's a reason it's s pyramid and not a rectangle after all.

Without the tests as a safety net, you'll either introduce lots of regression bugs in each release, or be terrified of refactoring. Both will greatly impact your ability to continue on at a sustainable pace. If you can't sustain your pace or change course (redesign) when required, then you don't have agility. Agility, after all, is the goal we're striving for.

Related Topic