Today's thoughts on work
Feb. 4th, 2008 12:08 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
- Unit testing is a very, very good thing.
- PHPUnit is a decent unit testing framework (for those of us stuck with PHP).
- Code coverage metrics comprise a very useful (critical?) part of unit testing: They can't promise that you've covered all possibilities, but they can tell you whether or not you've at least given all your executable LOC a run-through.
- PHPUnit's code coverage collection requires xdebug.
- xdebug appears to make my PHP interpreter (and Apache server) crash with no obvious pattern.
- I've read some cautions to the effect that xdebug may crash when other debug extensions are loaded.
- This is substantially irritating, but not
mission critical
for me: I don't need code coverage every time I run my tests; I just need the results. Code coverage is for when I sit down and decide what lacks proper test coverage (and right now the answer is, in any case,way too much
, and I don't need metrics to find many places to work on). I won't bother to track down the specific error when I can turn off code coverage for the moment and work on the more important issue of writing some damned tests and worry more about the metrics when the test quality is such that I need tools to find the holes. - It's still bloody annoying.