From f9b24990d6a91f71cd89f5c14ed530692be64864 Mon Sep 17 00:00:00 2001 From: William Martin Date: Fri, 11 Oct 2024 16:27:40 +0200 Subject: [PATCH] Add codecoverage to Acceptance README --- acceptance/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/acceptance/README.md b/acceptance/README.md index 7d39cebba..13cbfe86e 100644 --- a/acceptance/README.md +++ b/acceptance/README.md @@ -30,6 +30,14 @@ A full example invocation can be found below: GH_ACCEPTANCE_HOST= GH_ACCEPTANCE_ORG= GH_ACCEPTANCE_TOKEN= test -tags=acceptance ./acceptance ``` +#### Code Coverage + +To get code coverage, `go test` can be invoked with `coverpkg` and `coverprofile` like so: + +``` +GH_ACCEPTANCE_HOST= GH_ACCEPTANCE_ORG= GH_ACCEPTANCE_TOKEN= test -tags=acceptance -coverprofile=coverage.out -coverpkg=./... ./acceptance +``` + ### Writing Tests This section is to be expanded over time as we write more tests and learn more.