Skip to content

Commit

Permalink
add test coverage usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sjqzhang committed Feb 16, 2023
1 parent ea2a31d commit 76873a2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,14 @@ func testMockDocker() {

}

```
```

## 生成覆盖率及测试报告

```bash

go test -timeout 0 -covermode=count -coverprofile=coverage.out -run="^Test" -coverpkg=package1,package2

go tool cover -html=coverage.out -o coverage.html

```

0 comments on commit 76873a2

Please sign in to comment.