Skip to content

Commit

Permalink
feat: show the test cases count in the markdown test report (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen authored Jun 27, 2023
1 parent 02d7e23 commit 3061534
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pkg/runner/data/report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
There are {{len .}} test cases:

| API | Average | Max | Min | Count | Error |
|---|---|---|---|---|---|
{{- range $val := .}}
Expand Down
4 changes: 3 additions & 1 deletion pkg/runner/writer_markdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ func TestMarkdownWriter(t *testing.T) {
Error: 0,
}})
assert.Nil(t, err)
assert.Equal(t, `| API | Average | Max | Min | Count | Error |
assert.Equal(t, `There are 2 test cases:
| API | Average | Max | Min | Count | Error |
|---|---|---|---|---|---|
| api | 3ns | 4ns | 2ns | 3 | 0 |
| api | 3ns | 4ns | 2ns | 3 | 0 |`, buf.String())
Expand Down

0 comments on commit 3061534

Please sign in to comment.