Run failed tests first during rerun in Hudson

烂漫一生 提交于 2019-12-11 04:19:08

问题


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.

  1. 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.)
  2. Create a job that can run with "Trigger builds remotely" and pass the list from the url
  3. Use Selenium to grab the failure result from Hudson's "Test Result"
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!