![](/img/trans.png)
[英]Error while executing the rcov report, rails stats report and brakeman warnings from Jenkins
[英]Rcov report index file wasn't found in jenkins
我正在尝试为jenkins配置一个Rails项目。 有一些测试代码。 我正在使用rcov覆盖测试代码。 但是,当我在jenkins上构建项目时,发现以下错误。
Publishing rcov report...
rcov report index file wasn't found
在构建后的动作中,我采取了必要的步骤。 “ Rcov报告目录”的默认目录为coverage / rcov
有什么办法吗?
您应该按照以下步骤获得成功:
jenkins_app/configure/
然后,您需要执行Post-build Actions
,然后执行“ Publish Rcov report
您将看到Rcov report directory
文本字段,然后按coverage/rcov
填充文本框值
同样,在此之前,您需要确保您的gem文件中包含正确的gem:
#Gemfile
gem 'simplecov', :require => false, :group => :test
gem 'simplecov-rcov'
并像这样配置您的spec/spec_helper.rb
:
require 'simplecov'
require 'simplecov-rcov'
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
SimpleCov.start 'rails'
希望您的问题能得到解决!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.