Skip to content

Commit b086f57

Browse files
committed
Updated readme for highlighting and future tests breaking
1 parent 6bffea1 commit b086f57

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Any matched classes will not be instrumented or included in the coverage report.
4949
You can also mark sections of code with comments like:
5050

5151
```scala
52-
// $COVERAGE-OFF$
52+
// $COVERAGE-OFF$Disabling highlighting by default until a workaround for https://issues.scala-lang.org/browse/SI-8596 is found
5353
...
5454
// $COVERAGE-ON$
5555
```
@@ -66,6 +66,22 @@ ScoverageKeys.minimumCoverage := 80
6666
ScoverageKeys.failOnMinimumCoverage := true
6767
```
6868

69+
## Highlighting
70+
71+
By default, statement highlighting in the HTML reports is disabled. This is because there is a compiler bug when
72+
using range positioning, and until that is fixed it can break code that uses certain constructs. You can enable it to
73+
see if your code is not affected by adding this to your build file:
74+
75+
```scala
76+
ScoverageKeys.highlighting := true
77+
```
78+
79+
## Failing tests
80+
81+
If you are running into a scenario where your tests normally pass, but fail when scoverage is enabled,
82+
then the most common culprit is timing issues on futures and other async operations. Scoverage does a lot of file
83+
writing behind the scenes in order to track which statements have been executed, and this slows down tests, so try upping the timeouts by an order of magnitude.
84+
6985
## Disable parallel test execution
7086

7187
It is possible to disable the parallel execution for tests:

0 commit comments

Comments
 (0)