summaryrefslogtreecommitdiff
path: root/docs/src/developers/test-coverage.md
diff options
context:
space:
mode:
authorJack Koenig2021-09-17 21:01:26 -0700
committerJack Koenig2021-09-17 21:01:26 -0700
commit5c8c19345e6711279594cf1f9ddab33623c8eba7 (patch)
treed9d6ced3934aa4a8be3dec19ddcefe50a7a93d5a /docs/src/developers/test-coverage.md
parente63b9667d89768e0ec6dc8a9153335cb48a213a7 (diff)
parent958904cb2f2f65d02b2ab3ec6d9ec2e06d04e482 (diff)
Merge branch 'master' into 3.5-release
Diffstat (limited to 'docs/src/developers/test-coverage.md')
-rw-r--r--docs/src/developers/test-coverage.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/src/developers/test-coverage.md b/docs/src/developers/test-coverage.md
new file mode 100644
index 00000000..099db4bb
--- /dev/null
+++ b/docs/src/developers/test-coverage.md
@@ -0,0 +1,23 @@
+---
+layout: docs
+title: "Test Coverage"
+section: "chisel3"
+---
+
+# Test Coverage
+
+## Test Coverage Setup
+
+Chisel's sbt build instructions contain the requisite plug-in (sbt-scoverage) for generating test coverage information. Please see the [sbt-scoverage web page](https://github.com/scoverage/sbt-scoverage) for details on the plug-in.
+The tests themselves are found in `src/test/scala`.
+
+## Generating A Test Coverage Report
+
+Use the following sequence of sbt commands to generate a test coverage report:
+```
+sbt clean coverage test
+sbt coverageReport
+```
+The coverage reports should be found in `target/scala-x.yy/scoverage-report/{scoverage.xml,index.html}` where `x.yy` corresponds to the version of Scala used to compile Firrtl and the tests.
+`scoverage.xml` is useful if you want to analyze the results programmatically.
+`index.html` is designed for navigation with a web browser, allowing one to drill down to invidual statements covered (or not) by the tests.