You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `coverageEnabled := true` in `build.sbt` instruments the code unconditionally.
The right way to enable coverage is to do
`sbt clean coverageOn test coverageReport coverageAggregate`
Also it is important to do `sbt clean` after doing the coverage, otherwise the code
stay instrumented.
The problems to figure out:
1. when instrumented code is included into jar this jar doesn't work on another machine
2. apparently the `sbt clean` is not sufficient and the `target` directories for each
subproject need to be removed
3. setting `coverageEnabled := false` and trying to issue `sbt clean coverageOn ...`
doesn't produce report files
4. when `sbt ... coverageOn test` is used junit xml test report is not generated
5. we should run eunit tests using coverage as well
```
sbt clean coverageOn
make all-tests
sbt coverageReport coverageAggregate
```
6. we need to include mango tests into all-tests target
See following
- scoverage/sbt-scoverage#84
- scoverage/sbt-scoverage#228
- scoverage/sbt-scoverage#306
- https://github.com/viktortnk/kafka-storm-starter/blob/de6eac4ae635e0e54981a92555de05071c14518a/README.md?plain=1#L340C1-L342C58
- https://github.com/Facsimile/facsimile/blob/409dd67fd291161414401c97d128bf65c0fcc30f/Facsimile.sbt#L458
0 commit comments