Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby 如何在测试单元中将测试状态设置为成功_Ruby_Reporting_Testunit - Fatal编程技术网

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
。但是没有起作用。