summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Grafton <jgrafton@google.com>2015-02-19 18:40:28 -0800
committerJeff Grafton <jgrafton@google.com>2015-02-19 18:43:34 -0800
commit0e7dfbc995f979400dae9c740fe8fa8ea6203c49 (patch)
tree510455068cddc5caf81a3472621867a986821408
parentd20061eeff1b9cfa0774b9259143ca7f7c859791 (diff)
Update development doc on how to generate code coverage reports.
-rw-r--r--development.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/development.md b/development.md
index 67ef5916..615b4d55 100644
--- a/development.md
+++ b/development.md
@@ -133,11 +133,28 @@ ok github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet 0.317s
```
## Coverage
+
+Currently, collecting coverage is only supported for the Go unit tests.
+
+To run all unit tests and generate an HTML coverage report, run the following:
+
+```
+cd kubernetes
+KUBE_COVER=y hack/test-go.sh
+```
+
+At the end of the run, an the HTML report will be generated with the path printed to stdout.
+
+To run tests and collect coverage in only one package, pass its relative path under the `kubernetes` directory as an argument, for example:
```
cd kubernetes
-godep go tool cover -html=target/c.out
+KUBE_COVER=y hack/test-go.sh pkg/kubectl
```
+Multiple arguments can be passed, in which case the coverage results will be combined for all tests run.
+
+Coverage results for the project can also be viewed on [Coveralls](https://coveralls.io/r/GoogleCloudPlatform/kubernetes), and are continuously updated as commits are merged. Additionally, all pull requests which spawn a Travis build will report unit test coverage results to Coveralls.
+
## Integration tests
You need an [etcd](https://github.com/coreos/etcd/releases/tag/v2.0.0) in your path, please make sure it is installed and in your ``$PATH``.