简体   繁体   中英

Rcov report index file wasn't found in jenkins

I am trying to configure a rails project to jenkins. there are some test code. I am covering the test code using rcov. But when i build the project on jenkins , the following error was found.

Publishing rcov report...
rcov report index file wasn't found

In post build action i made the necessary steps. default directory for "Rcov report directory" is coverage/rcov

any solution ?

You should follow the bellow step to get success:

jenkins_app/configure/

Then you need to go Post-build Actions and then go Publish Rcov report

You will see Rcov report directory text field and then fill the text box value by coverage/rcov

Also before do this you need to ensure that you have right gem in your gem file:

 #Gemfile

 gem 'simplecov', :require => false, :group => :test
 gem 'simplecov-rcov'

And also configure your spec/spec_helper.rb like this:

require 'simplecov'
require 'simplecov-rcov'
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
SimpleCov.start 'rails'

I hope then your issue will be fixed!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM