ginkgo
ginkgo copied to clipboard
Specs aren't identified in `go test . -json` output
Running go test . -json
does not produce usable output when using Ginkgo. To be fully compatible with standard go tooling, producing test events that conform to the test2json spec would be necessary.
In particular, populating the Test
field with not just the name of the function that ran the specs, but the name of the specs in the form form "Suite/Context/Spec/Etc".
Maybe, it's worth to implement a streaming JSON reporter in Ginkgo which would conform with the test2json spec. A streaming JSON reporter has already been suggested in https://github.com/onsi/ginkgo/pull/143#issuecomment-75393126.
I could give it a try. What do you think @onsi ?
I'm going to be implementing the ability to emit a json test report in V2. I'll look into go test's output to see if it's a good fit but i expect i'll be producing a ginkgo specific format.
A beta for Ginkgo V2 was just released. It supports emitting JSON-formatted reports though, as mentioned above, it's Ginkgo's own JSON format which includes a bunch of rich test information.