views:

28

answers:

1

With continuous integration, it makes a lot of sense to re-run failed unit tests first the next time a cycle starts. This shortens the feedback loop.

Is there any known way to achieve this with CCNet and NUnit?

In principle, CCNet would have to have "memory" of which unit tests failed and NUnit would need to be instructed to run them in a different order.

+2  A: 

This would be against a principle of (unit) testing, that says that the ordering of tests has to be totally random (to make sure, that there is no dependency whatsoever between the individual tests).

So the answer is: No.

Btw.: How would this make sense and shorten the feedback cycle?

Thomas

Thomas Weller
There are no dependencies and this is not what it's about. If you are going to run 600 tests it simply makes sense to run the ones that have failed first.
Pieter Venter
Why? I don't get it. All the tests are run anyway and the test report shows you clearly the failing ones. So why would the order make any difference?
Thomas Weller
It saves you a bit of time, especially if you have thousands of unit tests that could take minutes to complete. If one fails, it's a convenience that next time you run failed ones first. Often times you want to fix one and verify the test passes now. Just convenience thing really.
Pieter Venter
How? Normally, you have a CI server, that doesn't even have a display and you get some sort of build notification only when everything is finished...
Thomas Weller
CI 1.5 has Web UI component that gives basic feedback. You can see build as well as unit test progress.
Pieter Venter
Oh, didn't know that. It's quite a long time that I worked with CC.Net. In this special case, what you have in mind might really be useful...
Thomas Weller