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
Then run the your tests with coverage enabled by entering:
20
+
Run the tests with enabled coverage:
21
21
```
22
22
$ sbt clean coverage test
23
23
```
@@ -26,24 +26,23 @@ or if you have integration tests as well
26
26
$ sbt clean coverage it:test
27
27
```
28
28
29
-
You can also enable coverage directly in your build:
29
+
To enable coverage directly in your build, use:
30
30
```
31
31
coverageEnabled := true
32
32
```
33
33
34
-
After the tests have finished you should then run
35
-
34
+
To generate the coverage reports run
36
35
```
37
36
$ sbt coverageReport
38
37
```
39
38
40
-
to generate the reports. You will find the coverage reports inside`target/scoverage-report`. There are HTML and XML reports. The XML is useful if you need to programatically use the results, or if you're writing a tool.
39
+
Coverage reportswill be in`target/scoverage-report`. There are HTML and XML reports. The XML is useful if you need to programatically use the results, or if you're writing a tool.
41
40
42
41
If you're running the coverage reports from within an sbt console session (as
43
42
opposed to one command per sbt launch), then the `coverage` command is sticky. To
44
43
turn it back off when you're done running reports, use the `coverageOff` command or reset `coverageEnabled` with `set coverageEnabled := false`.
45
44
46
-
If you want to see a project that is already setup to use scoverage in both sbt and maven, then clone[the scoverage samples project](https://github.com/scoverage/scoverage-samples).
45
+
Sample project with scoverage in both sbt and maven -[the scoverage samples project](https://github.com/scoverage/scoverage-samples).
47
46
48
47
## Notes on upgrading to version 1.3.0
49
48
@@ -86,11 +85,10 @@ Any code between two such comments will not be instrumented or included in the c
86
85
87
86
## Minimum coverage
88
87
89
-
You can use the following two keys to set the minimum coverage, and if you want to fail the build if the coverage is less than the minimum.
88
+
Based on minimum coverage, you can fail the build with the following keys
0 commit comments