Re:When TDD Fails
by jasonlotito on Sunday October 02, 2011 @11:02AM
(#3062990)
> Similarly, you can mock the database, but you're not testing all the "magic" the database does and all the myriad combinations it could fail.
You are correct. And this is why you unit test the DB and all the stored procs and queries you perform there.
And, this is also why you can add in tests that do use the database connection, and test the more complete stack. TDD does not limit you to only use the tests at the application level. It does not limit you to building other forms of tests. To imply that is dishonest. It would be akin to me saying "Because you do not use TDD, you do not test."
You are correct. And this is why you unit test the DB and all the stored procs and queries you perform there.
And, this is also why you can add in tests that do use the database connection, and test the more complete stack. TDD does not limit you to only use the tests at the application level. It does not limit you to building other forms of tests. To imply that is dishonest. It would be akin to me saying "Because you do not use TDD, you do not test."