Ruby 如何在测试单元中将测试状态设置为成功
我正在使用Ruby 如何在测试单元中将测试状态设置为成功,ruby,reporting,testunit,Ruby,Reporting,Testunit,我正在使用 gem 'test-unit' Github链接: 以及使用 gem 'ci_reporter' Github链接: 测试单元gem具有以下状态: pending omission notification pass error failure Success Failure Ci reporter gem具有以下状态: pending omission notification pass error failure Success Failure 我正在使用具有通知状态
gem 'test-unit'
Github链接:
以及使用
gem 'ci_reporter'
Github链接:
测试单元gem具有以下状态:
pending
omission
notification
pass
error
failure
Success
Failure
Ci reporter gem具有以下状态:
pending
omission
notification
pass
error
failure
Success
Failure
我正在使用具有通知状态的测试单元运行示例测试
使用ci reporter gem生成报告时,它会显示带有故障状态的通知消息
附上一份报告供参考
我需要用通知消息显示成功状态。怎么做?@karan很清楚,您想要影响的是CI reporter xml报告的输出,而不是测试的失败/通过状态?如果您调用
Kernel.exit 1
,失败后什么也不做(或Kernel.exit 0
),则应处理通过/失败状态,但如果CI reporter无法捕获您的状态,则最好检查他们的文档或在那里打开问题。但是,如果你有一个方法返回0或1,他们会像上面那样调用Kernel.exit,我会在我的debt\u limit
gem for ci integration中这样做,它在那里工作得很好。你有没有尝试过在通知后返回0
或1
。但是没有起作用。