我正在尝试使用chef-minitest-handler和Vagrant在VM中测试我的厨师烹饪书。我能够运行测试,但我想将它集成到Jenkins中。
是否有可能以Jenkins将理解的方式(例如jUnit)保存测试结果从厨师[融入VM]中获得并显示一个很好的通过/失败测试图?
答案 0 :(得分:4)
在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