strong statements about testing

April 21, 2010

I enjoyed “strong statements” in Shannon Behrens’ SF Ruby talk tonight. I didn’t agree with all of them, but not vehemently so. I do strongly agree with the following.

Shannon states that “integration tests have more value than unit tests.” I would say instead that some unit tests that rely heavily on mocking have a high risk of not achieving their goals, and in these cases integrations tests have more value. (For example, I typically test Rails controllers through integration tests rather than unit test.) However, when a class is relied upon as the foundation for my app, unit tests for that class are more valuable than integration tests because they help me find and fix bugs faster than the integration tests. But I agree that integration tests are essential.


Comments

Shannon -jj Behrens April 24, 2010

Hey, Sarah, thanks for the plug! I think I can agree with your response.

Eric April 27, 2010

Hey, since when does JJ go by Shannon? Hi to both of you guys!!

Shannon -jj Behrens April 27, 2010

Ha! Yeah, I just mentioned to Sarah tonight that I knew you, since I noticed she worked on OpenLaszlo.