我正在尝试使用 Chef-minitest-handler 和 Vagrant 在 VM 中测试我的 Chef Recipe 。我能够运行测试,但我想将其集成到 Jenkins 中。
是否有可能以 Jenkins 能够理解的方式(例如 jUnit)保存从 Chef [汇聚在 VM 中] 获得的测试结果,并显示良好的通过/失败测试图?
最佳答案
在 Chef-minitest-handler 的 git 版本中(至少)有一个名为 :ci_reports 的处理程序参数,它指定您想要存储 junit 输出的位置。例如:
handler = MiniTest::Chef::Handler.new({
:path => './cookbooks/test/*_test.rb',
:ci_reports => 'report.xml',
:verbose => true})
# add to the list of handlers
这会将junit兼容的报告写入report.xml
关于jenkins - 在 Jenkins 中显示 Chef Minitest 处理程序测试结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11310000/