Lean Testing or Why Unit Tests are Worse than You Think
Eugen Kiss
6.3K64

It’s a very one sided article.

Write code for unit tests helps decouple the code. This article assume coders won’t create legacy code (big methods, spaghetti code, big balls of mud etc).

Unit testing can help developers refactor code and allow them to test if their changes have broken anything. Without unit tests you need to rely on integration tests or manual testing, which are longer to run and could be harder to find smaller problems in specific bits of functionality (e.g. if you changed the next working day function, would integration test pick this up).

Without unit tests the developers have to manually test their code to check it works. The benefit of unit testing is they think about the different things they need to test.

I’m not sure why the article seems intent on making people choose between integration tests and unit tests. Why are the competing, why do people need to choose between them.