Re:Unit Testing: Is There Really Any Debate Any Longer?
by programminggeek on Wednesday September 12, 2012 @10:33AM
(#4510842)
Actually, if it's tied to an ORM, then you have to make DB calls for each tests, which is to say running the full test suite could take minutes, hours, or even days? If it takes a long time to run your tests, how often will you run them?
I'm not trying to imply that integration tests that hit the DB are always a bad thing, just that slow tests are another reason people don't like or use tests.
Re:Unit Testing: Is There Really Any Debate Any Longer?
by rwallace on Wednesday September 12, 2012 @02:31PM
(#4512199)
Certainly a programmer should not be sitting idle waiting for tests to finish. If you have a test suite that takes hours, it should be run every night. If that's still not frequent enough, you want test runs during the day, and it would slow down your machine too much to do those while you are working, fire up an EC2 instance.
Re:Unit Testing: Is There Really Any Debate Any Longer?
by Daniel_Newby on Wednesday September 12, 2012 @04:16PM
(#4512926)
Google recommends a hierarchy of tests. Say, (1) a quick test to make sure no REST URL crashes that runs in seconds, (2) a full functionality test that runs in minutes, (3) a fuzzer test that runs for hours, and (4) a stress test that runs for days or weeks.
Re:Unit Testing: Is There Really Any Debate Any Longer?
by programminggeek on Wednesday September 12, 2012 @10:39PM
(#4514522)
Wow, that's awesome. I love the idea of a test hierarchy. I'm sure as a system grows in complexity and scale, fuzzing and stressing would make a lot of sense.
Unit test, yes. System integration test, no.