go-testng-report

command module
v0.0.0-...-32ca854 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 10 Imported by: 0

README

go-testng-report

A tool to convert go test results to testng reports xml.

Usage of testng-report:
	-json-report string
		Golang json test report (default "report.json")
	-out string
		TestNG Report XML (default "testng-results.xml")
	-testng-groups string
		TestNG group mapping (default "groups.properties")

Basic Use

  1. Generate json test report for your go module
Example:
      # cd your_module
      # go test -json ./... > report.json
  1. Run go-testng-report
Example:
      # cd your_module
      # go-testng-report

TestNG Groups

By default, all tests are tagged with group "UT". This can be customized by placing groups.properties in the project or by passing -testng-groups argument to go-testng-report.
If the test has a match in the groups.properties, then test is tagged with the groups mentioned, otherwise it is tagged with "UT". The match may be by package.testName or by package, package.testName takes higher precedence.
For reporting convenience on Jenkins, module name is used as package name and all subpackage names are hyphenated, so that all packages are grouped by module name.

groups.properties convention:
module.package=G1,G2,...
module.package.testName=Group1,Group2,...

Note: Generate a testng-reports.xml with default groups to better understand the naming convention followed and update groups.properties accordingly.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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