mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-22 14:33:06 +01:00
Add doc on generating coverage report (#380)
This commit is contained in:
parent
35493249cc
commit
e83b40ea93
2 changed files with 29 additions and 8 deletions
|
@ -1 +1,29 @@
|
|||
[  ](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.
|
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Add table
Reference in a new issue