问题
I have a long-running unit test job in hudson. If some tests fail I want to run them first and not wait for other tests to run before them (to see, have I fixed them, or not). Is it possible to setup this in Hudson? Thanks.
回答1:
I have the same issue before, here is my solution.
- You can write a standalone program to run a list of unit test cases. (In my case, I wrote a Java main class to run Junit manually.)
- Create a job that can run with "Trigger builds remotely" and pass the list from the url
- Use Selenium to grab the failure result from Hudson's "Test Result"
- Use Selenium to trigger the job from "Trigger builds remotely" with the failure list.
By the way, you can also send a mail with the result when the rerun testing failure, and then you can just check mail if the test is real "failure".
Note that the Selenium is not necessary if you have another choice.
回答2:
Don't think it's possible in Hudson, but if you're using Eclipse (sorry I'm assuming you're using Java), you can run the tests, and re-run them using 'Rerun Test - Failures First'.
来源:https://stackoverflow.com/questions/6249655/run-failed-tests-first-during-rerun-in-hudson