gotestyourself / gotestsum

'go test' runner with output optimized for humans, JUnit XML for CI integration, and a summary of the test results.
Apache License 2.0
2.04k stars 121 forks source link

Include ginkgo test results #273

Open airycanon opened 2 years ago

airycanon commented 2 years ago

Hi, I have some ginkgo tests file in my project, go test command output:

go test -v ./...

=== RUN   TestSimple
=== RUN   TestSimple/test-1
=== RUN   TestSimple/test-2
--- PASS: TestSimple (0.00s)
    --- PASS: TestSimple/test-1 (0.00s)
    --- PASS: TestSimple/test-2 (0.00s)
=== RUN   TestGinkgo

Running Suite: test ginkgo
==========================
Random Seed: 1661393940
Will run 3 of 3 specs

•••
Ran 3 of 3 Specs in 0.000 seconds
SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestGinkgo (0.00s)
PASS

the test output include a ginkgo summary:

SUCCESS! -- 3 Passed | 0 Failed | 0 Pending | 0 Skipped

I'm wondering if gotestsum could collect these test results, thanks for any help.

dnephin commented 2 years ago

I am not familiar with the ginkgo output, but from what you've shared it looks like ginkgo has its own output format.

gotestsum is specifically designed for https://pkg.go.dev/cmd/test2json output, and I'm not keen on the idea of expanding the scope of the project to support other non-standard formats.

If ginkgo has a way of outputting test2json then it should be easy for gotestsum to receive the test output.

BorzdeG commented 1 year ago

found - Ginkgo has support for outputting a report in json / junit format