sbt-scoverage v1.8.0
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
- Coverage minima: add more fine-grained control (#253) @kitbellew
- Report test names (#297) @vincentdehaan
- Added TeamCity branch coverage reporting (#258) @alexnikitchuk
Bug Fixes
Housekeeping
- Bump scoverage version to 1.4.6 (#349) @ckipp01
- Update sbt, scripted-plugin to 1.5.2 (#348) @scala-steward
- Update tests in scripted. (#347) @ckipp01
- Overhaul the README (#346) @ckipp01
- Add in Scalafmt (#344) @ckipp01
- Remove local snapshot version (#343) @ckipp01
Big thanks to everyone that made this release possible!