Open ghost opened 12 years ago
+1
+1
PR? or just R?
+1
I don't even understand what this ticket means. Just run simplecov along with your suite and use the HTML publisher plugin. It should be closed.
@bf4 Why? Because of health concerns:
It's much easier to take a look at that than go look at a bunch of reports somewhere else.
Here's the exception if it matters:
Publishing rcov report...
ERROR: Publisher hudson.plugins.rubyMetrics.rcov.RcovPublisher aborted due to exception
hudson.util.IOException2: cannot parse rcov report file
at hudson.plugins.rubyMetrics.rcov.RcovParser.parse(RcovParser.java:61)
at hudson.plugins.rubyMetrics.rcov.RcovParser.parse(RcovParser.java:34)
at hudson.plugins.rubyMetrics.rcov.RcovPublisher.perform(RcovPublisher.java:51)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1770)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: org.htmlparser.util.ParserException: cannot parse rcov report file, report element wasn't found
at hudson.plugins.rubyMetrics.rcov.RcovParser.getReportTable(RcovParser.java:71)
at hudson.plugins.rubyMetrics.rcov.RcovParser.parse(RcovParser.java:42)
... 11 more
Notifying upstream projects of job completion
Update, it looks like the following makes this work:
require 'simplecov'
require 'simplecov-rcov'
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
SimpleCov.start 'rails'
@skord any idea if this was updated upstream?
Was fighting with this today also. The coverage/index.html
generated by SimpleCov::Formatter::HTMLFormatter
from simplecov
does not have the format https://github.com/jenkinsci/rubymetrics-plugin/blob/master/src/main/java/hudson/plugins/rubyMetrics/rcov/RcovParser.java expects. The simplecov-rcov
gem providesSimpleCov::Formatter::RcovFormatter
which generates the expected format in the coverage/rcov/index.html
That's why it works like @skord posted.
So to support SimpleCov
this plugin should read .last_run.json
. Think it only provides total code coverage though and not total coverage. At least that's my understanding.
RCov does not work on Ruby 1.9. SimpleCov is Ruby 1.9's code coverage tool. Add support for SimpleCov