Is there a tool to run unit tests on previous versions of software that’s in source control?
The idea would be a bug surfaced and I want to know when it was introduced so I write a new test and the software checks out each back version from source control, running the test on each one, until the test doesn’t fail anymore or we reach the beginning.
We use subversion but I’m curious of if anything like this exists in general.
Mercurial has a built in command called bisect that essentially does what you are looking for.
It is designed to work with a user-written script but in a nutshell, it does a binary search where your script (which runs the unit tests) tells bisect if the checked out revision “passes” or “fails” and based on that it moves through the history until it finds the revision where the bug was introduced.
I’m not sure if such a tool exists for SVN, but I’ve found bisect with Mercurial to be very useful for this sort of thing.