Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.
Yup. chromatic has forced me to drink the testing kool-aid. I have a large Web site that I maintain and frankly, the code's a pig. It's embarrassing. And it has no tests. We've been asked to make some major changes (of course, they always ask us to make major changes) and it's forced me to renormalize the database. In my estimate, I included a large chunk of time for writing tests for system.
To ensure that my test environment would work, I took what is far and away the most stable module and started writing tests for it. I'm now up to 28 tests, but I discovered something very interesting. My first few tests failed immediately. After a bit of research, I discovered a long standing bug in the code that was causing intermittant failures. I was never able to track the bug, but my fourth test uncovered it immediately!
With supreme confidence garnered through having tests started, I went through and made some sweeping changes in the code and now this "stable" module is even more stable. I love tests
Of course, I will never be able to properly forgive chromatic for destroying my carefree idealism.
Hooray for testing! (Score:2)
Test everything. Test your most basic assumptions. Once you write it, it's done, and will be in your employ forever.
Here's some stuff I wrote yesterday that reads a tree structure of nodes from the DB and makes sure that there are no stray, unlinked nodes:
--
xoa
Re:Hooray for testing! (Score:1)
How useful are you finding embedded POD in your tests? I've been of the opinion that good test names go a long way, but does a little documentation go even further?
Re:Hooray for testing! (Score:2)
I do always make sure that every test has a name, though. I hate seeing:
and then having to count down to test 4 in the code to see what it is--
xoa