Skip to content

A command line utility for converting the output of Go tests into allure reports.

License

Notifications You must be signed in to change notification settings

robotomize/go-allure

Folders and files

NameName
Last commit message
Last commit date
Dec 7, 2024
May 17, 2023
May 17, 2023
Aug 31, 2023
Jul 1, 2023
Mar 7, 2023
Apr 1, 2023
Jul 1, 2023
Jul 1, 2023
Mar 7, 2023
Jul 1, 2023
May 17, 2023
Dec 5, 2024
Dec 5, 2024

Repository files navigation

⚡ Go-allure

Go Report codebeat badge codecov Build status GitHub license

A command line utility for converting the output of Go tests into allure reports.

Demo

demo

Install

Go

go install github.com/robotomize/go-allure/cmd/golurectl@latest

Docker

docker pull robotomize/golurectl:latest

Usage

Export go test output to allure reports

Usage:
  golurectl [flags]
  golurectl [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  version     actual version

Flags:
      --allure-labels string   add allure custom labels to all tests: --allure-labels key:value,key:value1,key1:value
      --allure-layers string   add allure layers to all tests: --allure-layers UNIT,FUNCTIONAL
      --allure-suite string    add allure suite to all tests: --allure-suite MyFirstSuite
      --allure-tags string     add allure tags to all tests: --allure-tags UNIT,ACCEPTANCE
  -a, --attachment-force       create attachments for passed tests
  -e, --forward-exit           forward the origin go test exit code
  -l, --forward-log            output the origin go test
      --gotags string          pass custom build tags: --gotags integration,fixture,linux
  -h, --help                   help for golurectl
  -o, --output string          output path to allure reports: -o <report-path>
  -s, --silent                 silent allure report output(JSON)
  -v, --verbose                verbose

Use "golurectl [command] --help" for more information about a command.

Getting started

To quickly see how golurectl works, you can use the following guide

go install github.com/robotomize/go-allure/cmd/golurectl@latest
cd <go-project-dir>
go test -json -cover ./...|golurectl -l -e

A more complex example with the generation of report files and attachments

go test -json -cover ./...|golurectl -l -e -s -a -o ~/Downloads/reports --allure-suite MySuite --allure-labels epic:my_epic,custom:value --allure-tags UNIT,GO-ALLURE --allure-layers UNIT

Demo with reports

demo