Skip to content

Coverage reports not generated in 1.3.5 plugin #161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
natemurthy opened this issue Feb 27, 2016 · 3 comments
Closed

Coverage reports not generated in 1.3.5 plugin #161

natemurthy opened this issue Feb 27, 2016 · 3 comments

Comments

@natemurthy
Copy link

I noticed that when using sbt-scoverage plugin 1.3.5 that coverage reports are no longer generated using the command

sbt clean coverage test

I have to run a separate command now to generate the report

sbt coverageReport

whereas in earlier versions of the plugin (e.g. 1.10) I could just run the first command and also get the coverage report at the end of my tests. What was the motivation for doing this? I see no difference now in running sbt clean test and sbt clean coverage test in the newer release of the plugin.

I have SBT 0.13.9 with Scala 2.11.7

@hamiltondfp
Copy link

Running sbt clean coverage test will generate the scoverage-data under target/scala-[version]/

Running sbt coverageReport will create the the coverage-report and scoverage-report data in the same directory after you have ran sbt clean coverage test.

So running sbt clean coverage test is still required, but you are correct that running sbt coverageReport was not required in previous versions. I too would be interested to know if this is by design and if so I'm interested in knowing the advantage.

@natemurthy
Copy link
Author

Yes,

I too would be interested to know if this is by design and if so I'm interested in knowing the advantage.

I am in the same boat as @hamiltondfp

scosenza pushed a commit to twitter/finatra that referenced this issue Mar 16, 2016
Problem

Coverage reporting has changed in sbt-scoverage 1.3.5. This
issue highlights the problem:
scoverage/sbt-scoverage#161

Solution

Add the needed step to the travis build configuration to
properly generate coverage reports.

Result

Actual coverage reporting after the travis ci build runs.

RB_ID=811398
TBR=true
finaglehelper pushed a commit to twitter/util that referenced this issue Jun 7, 2016
Problem

This commit causes downstream projects to fail as the autoplugin
mechanism for the scoverage plugin is wreaking havoc when downstream
projects: ostrich, scrooge and finatra try to run their tests.
FileNotFoundExceptions are generated (the scoverage Invoker is getting
run during tests which fails due to no coverage data being available at
that time). An example failure:
https://s3.amazonaws.com/archive.travis-ci.org/jobs/135689956/log.txt

Additionally upgrading to scoverage plugin version 1.3.5 does not work
with TravisCI because of these issues:
scoverage/sbt-scoverage#161
scoverage/sbt-scoverage#146

Which caused us to back out of upgrading to scoverage 1.3.5 previously.

The odd thing is that util built fine with these changes, unfortunately
the downstream projects did not.

Solution

Revert commit, RB 837525 and update the .travis.yml.

Result

Downstream projects no longer fail to build.

RB_ID=839869
@ckipp01
Copy link
Member

ckipp01 commented Apr 28, 2021

Seeing that this is quite old and there are newer versions available, I'm going to go ahead and close.

@ckipp01 ckipp01 closed this as completed Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants