Archive for November, 2009

Declare War on Everything with Chaser

November 8, 2009

Chaser is a new lightweight mutation tester. Mutation testing involves messing up code that’s being tested, and seeing if the unit tests notice anything’s wrong.

Fake APEC passes by the Chaser

You need to detect when something's wrong

The name is based on The Chaser, an Australian comedy team. They’re best known internationally for a penetration test gone horribly, horribly right.

The main ruby gem that does mutation testing right now is Heckle. The folks from Seattle.rb have done a lot of work on it, but sometimes you’re simply out of luck. It doesn’t work on certain platforms – Windows (correction below), Ruby 1.9 and the like – because it currently relies on ParseTree. One day, I decided that I wanted to be able to do mutation testing on Windows. Like, yesterday. And thus Chaser was born.

Chaser uses plain old metaprogramming. If you’ve got ruby, and you’ve got test/unit, then you satisfy the requirements for chaser. So far, I’ve played with it on Windows, 1.9 and JRuby.

Bug reports, feedback, new features, and fake beards are welcome.

Correction 2009-12-17: Apparently, it is possible to make Heckle work on Windows, if you have a suitable compiler and make a minor change to Heckle’s code.

Extra links: Slideshare notes, and a video presentation thanks to the awesome folk at Ruby On Rails Oceania.