Skip to content

testing: add -test.report flag for xunit/junit results #17542

@techtonik

Description

@techtonik

The idea is to add -test.report=junit flag to go test, which will produce gotests.xml in current directory (borrowed from https://nose.readthedocs.io/en/latest/plugins/xunit.html#options).

This is an extension of #2981 (and this specific #2981 (comment) by @alberts).

Why xUnit/JUnit first and not JSON?

JSON is not a specification for testing, so services like AppVeyor can't support it.

Why write report to file instead of streaming it to the screen?

Because screen is for humans and report are for robots. It is very inconvenient to sacrifice one for another with pipe formatters like https://github.com/jstemmer/go-junit-report and https://github.com/tebeka/go2xunit because there is no tee on Windows.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions