ALL
That’s Not TDD
A few months ago I was visiting a client who was having a lot of problems using TDD.“It takes over half an hour to run our unit tests,†he said.“You are not doing TDD,†I said. “In order for tests to be valuable all of them must run fast—within a few seconds, or developers will stop running tests frequently.â€â€œBut how to I make them run fast?†he asked, “Just connecting to the database takes 30 secondsâ€So I showed him a technique called Dependency Injections that allowed him to insert a mock object instead of the database. â€...