在Hudson中重新运行期间首先运行失败的测试 [英] Run failed tests first during rerun in Hudson

查看:158
本文介绍了在Hudson中重新运行期间首先运行失败的测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在哈德森有一个长期运行的单元测试工作.如果某些测试失败,则我想先运行它们,而不要等其他测试先运行(看看是否已修复它们). 可以在哈德森设置吗? 谢谢.

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.

推荐答案

我之前遇到过同样的问题,这是我的解决方法.

I have the same issue before, here is my solution.

  1. 您可以编写一个独立程序来运行单元测试用例列表. (就我而言,我编写了一个Java主类来手动运行Junit.)
  2. 创建可与远程构建触发器"一起运行的作业,并从url传递列表.
  3. 使用从哈德森的测试结果"中获取失败结果
  4. 使用 Selenium 从带有故障列表的远程生成触发器"中触发作业.
  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.

这篇关于在Hudson中重新运行期间首先运行失败的测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆