Running Scoverage with Maven - can I get coverage without running the tests twice?

497 views
Skip to first unread message

sean.m....@gmail.com

unread,
Mar 14, 2016, 2:28:18 PM3/14/16
to Scala code coverage tool
I'm using Scoverage on a Scala project with ScalaTest, using the scalatest and scoverage plugins.

On our our build (mvn clean install), our tests run twice. Once from scalatest and once again from the scoverage check task.

I've been looking to see if there is a way to get the coverage report without re-running the tests or run the tests only with the coverage report. As far as I have been able to tell, this is not possible. The check task invokes test lifecycle phase, so I need my tests to run as part of the test phase independently of scoverage and allow scoverage to invoke the same in order generate the coverage statistics.

I thought I would check though, is it possible to run my tests and get the coverage report with a single test run with the maven plugin?

Grzegorz Slowikowski

unread,
Mar 15, 2016, 5:52:47 AM3/15/16
to sean.m....@gmail.com, Scala code coverage tool
Hi Sean

No, it's not possible.
I was thinking of a trick to skip normal tests and run only for scoverage check/report, but nothing came to my mind.

Regards
Grzegorz Slowikowski


--
Scoverage, Scala code coverage tool
Github : https://github.com/scoverage
Discussion : https://groups.google.com/group/scala-code-coverage-tool
---
You received this message because you are subscribed to the Google Groups "Scala code coverage tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-code-coverag...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages