![](/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.