github scoverage/sbt-scoverage v1.8.0
sbt-scoverage v1.8.0

latest releases: v2.2.2, v2.2.1, v2.2.0...
3 years ago

The v1.8.0 release is the first release in a while to bring some new
features!

One thing you may have noticed in the past was some confusion around how
coverageMinimum was calculated. For example you would often see something like
the following:

// build.sbt
coverageMinimum := 80

Then you'd run your tests, and the output would be as follows:

[info] Statement coverage.: 81.00%
[info] Branch coverage....: 70.00%

[info] Coverage reports completed
[info] All done. Coverage was [81.00%]

You may be wondering how does that equate to 81%? There has been quite a few
issues reported in the past that referred to the average not being correct.
However, the coverageMinimum is not an actual average, but simply the
statement coverage. So while branch coverage is shown, it has no effect on the
actual percentage used to fail your build or to show you your end coverage
percentage. This is part of the reason why we've decided to deprecate
coverageMinimum in favor of coverageMinimumStmtTotal to make this clearer.

Another reason is due to the newly added more fine-grained controls you have for
coverage totals thanks to the great work by @kitbellew. Now we are able to
have much finer control over the various totals with the introduction of some
new setting keys that can all be used to fail your build:

coverageMinimumStmtTotal := 90
coverageMinimumBranchTotal := 90
coverageMinimumStmtPerPackage := 90
coverageMinimumBranchPerPackage := 85
coverageMinimumStmtPerFile := 85
coverageMinimumBranchPerFile := 80

New Features

Bug Fixes

Housekeeping

Big thanks to everyone that made this release possible!

Don't miss a new sbt-scoverage release

NewReleases is sending notifications on new releases.