Add doc on generating coverage report (#380)

This commit is contained in:
Torkel Rogstad 2019-03-14 17:39:45 +01:00 committed by Chris Stewart
parent 35493249cc
commit e83b40ea93
2 changed files with 29 additions and 8 deletions

View file

@ -1 +1,29 @@
[ ![Download](https://api.bintray.com/packages/bitcoin-s/bitcoin-s-core/bitcoin-s-core-test/images/download.svg) ](https://bintray.com/bitcoin-s/bitcoin-s-core/bitcoin-s-core-test/_latestVersion)
## Running tests
To run the entire `core` test suite:
```bash
chris@chris:~/dev/bitcoins-core$ sbt coreTest/test
# lots of output, should end up with something like this
[info] All tests passed.
[info] Passed: Total 1008, Failed 0, Errors 0, Passed 1008
[success] Total time: 38 s, completed Dec 23, 2018 4:39:58 PM
```
## Coverage
To produce a report that quantifies how much of our code is covered by tests:
```bash
sbt
> coverage
> coreTest/test
> core/coverageReport
```
This generates three different reports: Cobertura, XML and HTML formats.
See the output of your sbt shell to find the location of them.
Open up the HTML file in your browser. You'll now see code coverage
of all files in `core` project.

View file

@ -187,12 +187,5 @@ result: org.bitcoins.core.script.result.ScriptResult = ScriptOk
## Running `core` tests
To run the entire `core` test suite:
See [`core-test/README.md`](../core-test/README.md).
```bash
chris@chris:~/dev/bitcoins-core$ sbt coreTest/test
# lots of output, should end up with something like this
[info] All tests passed.
[info] Passed: Total 1008, Failed 0, Errors 0, Passed 1008
[success] Total time: 38 s, completed Dec 23, 2018 4:39:58 PM
```