jenkins - 在 Jenkins 中显示 Chef Minitest 处理程序测试结果

标签 jenkins chef-infra vagrant minitest

我正在尝试使用 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/

相关文章:

chef-infra - Chef 节点 - 检查配方是否会在其上运行,同时查看角色内部

nginx - 如何配置Chef Solo在新的Vagrant盒子上安装Nginx?

linux - Vagrant box 无法 ping 通主机

python - Vagrant 起来 : InsecurePlatformWarning

javascript - 安装插件后无法在 Jenkins 中看到 Node 选项 'Global Configure'

python - Pylint 警告只出现在 Jenkins 上

deployment - 我的应用程序多次安装 - 我该如何处理

mysql - OpsWorks/Chef : multiple versions of a cookbook are required

authentication - Jenkins/Nginx - 两次提示基本身份验证,为什么?为什么有内部 Jenkins 身份验证?

jenkins - 从正在运行的版本中读取consoleText URL仅返回前10000行