On 29 Nov 2007, at 15:08, Andy Armstrong wrote:
[snip]
One I'd like even more would be to run tests in order of most-
recently-failed. It's something I've hacked together several times
at various companies with T::H::Straps.
$ prove --state=fail,all,save
?
(option order matters, 'fail' adds the failed tests to the run
queue, 'all' adds everything, list is de-duped so the failures run
first, saved for next time)
I think that's subtly different from most-recently-failed order.
"-state=fail,all,save" gives me failing tests first. If I'm reading
you right it doesn't apply ordering within the groups of tests.
Running all tests in most-recently-failed order gives me (roughly)
the tests that a more likely to fail first - even (and this is the
nice bit) when they happen to be passing at the moment.
So, with most-recently-failed, as soon as I see an "ok" on the list I
know that all my previously failing tests pass. As soon as I see the
first few "ok"s go past I can feel fairly confident that the things
that are likely to break haven't. I can then go back to coding while
the rest of the suite runs. If anything else fails then I'll see it
at the end, and it will pop to the front of the list.
I like this coz my preferred way of working is to run all of the
tests all of the time, rather than just the particular test script
that I'm working on at the moment. That way if I have some dumb code
that breaks something else in the system I get the feedback earlier.
Make vague sense?
Cheers,
Adrian