clean
the project before generating the coverageReport? It seems to me that, changing only one line, and then re-generating the report gets me wrong results (everything to 0.0% in my case). Then I just do clean
-> test
-> coverageReport
and it shows "normal" numbers again
coverage; test; it:test; coverageOff; coverageReport
test
scope part[info] Cleaning datadir [/my-project/target/scala-2.12/scoverage-data]
[info] Beginning coverage instrumentation
[info] Instrumentation completed [456 statements]
[info] Wrote instrumentation file [/my-project/target/scala-2.12/scoverage-data/scoverage.coverage]
[info] Will write measurement data to [/my-project/target/scala-2.12/scoverage-data]
it:test
scope part[info] Cleaning datadir [/my-project/target/scala-2.12/scoverage-data]
[info] Beginning coverage instrumentation
[info] Instrumentation completed [18 statements]
[info] Wrote instrumentation file [/my-project/target/scala-2.12/scoverage-data/scoverage.coverage]
[info] Will write measurement data to [/my-project/target/scala-2.12/scoverage-data]
coverageReport
part[info] Reading scoverage instrumentation [/my-project/target/scala-2.12/scoverage-data/scoverage.coverage]
scoverage.report.ScoverageHtmlWriter#write
myself I guess
coverageDataDir
setting or something like that? Can you set it explicitly for the it
scope?
groupBy
something more permanent than their id
, and somehow merge them
count
, &&
ignored
, and if things like start
aren't the same throw an error or take any, or include that in the grouping key)
coverageEnabled := true
produce the exact compiled artifacts as coverageEnabled := false
?
Hi guys,
I'm setting up a scoverage into a multi-module gradle project. It included it before, but it was disabled while the project was updated to scala 2.13.8 (from Scala 2.12).
Now I'm using the gradle-scoverage plugin 6.1.0, with the scoverageVersion set to 1.4.11. This is supposed to support Scala 2.13.8, but I keep getting this error while
runnign reportScoverage task:
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)Ljava/lang/Object;
at scoverage.report.CoverageAggregator$.aggregate(CoverageAggregator.scala:18)
at scoverage.report.CoverageAggregator.aggregate(CoverageAggregator.scala)
at org.scoverage.ScoverageReport$_report_closure1.doCall(ScoverageReport.groovy:51)
at org.scoverage.ScoverageReport$_report_closure1.doCall(ScoverageReport.
From what I can gather, this error usually relates to old scala version creating a conflict with the new one. I don't know which part here could cause this mismatch, any ideas?