Re:How Balanced Automates Testing and Continuously Deploys
by masklinn on Thursday March 21, 2013 @08:05AM
(#5414457)
> Hi there. Why would you expect 5000+ tests, or anything more than 100?
It might be a factor of testing methodology and style, many people consider that each assert is a test/each test should only assert a single things, so the number of tests grows large. I was also surprised at a "mere" 950 unit tests (our web frontend has maybe 10% test coverage and reports almost 700 tests, but that's because the test runner counts each assertion as a test, not each test case — of which we have 200)
Re:How Balanced Automates Testing and Continuously Deploys
by msherry on Thursday March 21, 2013 @03:14PM
(#5418039)
Ahh, I see. Right, 950+ is the number of unit tests we have, each of which contains a number of assertions. If we count those, it's well into the thousands, so I guess the original question wasn't that far off the mark.
We write tests when new code is added, or a bug is fixed and we want to make sure it doesn't reappear. Hopefully we add new tests without prompting, because that's the right thing to do, but our coverage enforcement will goad us into writing tests if we forget. Ideally, new code should be testable by only a few tests -- if it requires more, then it's probably too complicated and should be refactored.