go-testreport

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 7 Imported by: 0

README

Test Report

Pipeline Status Go Report Card PRs Welcome License

Generate a markdown test report from the go json test result.

Matches perfectly with github job summaries to visualize go test results:

ReportExample

The default output sorts the tests to show failing and slow tests at the top.

Install

Install via the go install command:

go install github.com/becheran/go-testreport@latest

Or use the pre-compiled binaries from github releases.

Run

Will use the standard input and return the result into a file:

go test ./... -json | go-testreport $GITHUB_STEP_SUMMARY

Customize by providing a own template file. See also the default markdown template. With the vars options custom values can be passed to the template from the outside:

go test ./... -json | go-testreport -template=./html.tmpl -vars="Title:Test Report Linux" $GITHUB_STEP_SUMMARY

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL