Skip to content

Commit d82298f

Browse files
committed
docs
1 parent 2af1ea3 commit d82298f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docs/index.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3716,22 +3716,25 @@ The resulting JSON file encodes an array of `types.Report`. Each entry in that
37163716

37173717
When possible, we recommend building tooling on top of Ginkgo's JSON format and using Ginkgo's `types` package directly to access the suite and spec reports. The structs in the package include several helper functions to interpret the report.
37183718

3719-
Ginkgo also supports generating JUnit reports with
3719+
Ginkgo also supports generating output in additional formats, however Ginkgo specs carry much more metadata than can easily be mapped onto different output reports formats, so information may be lost and/or a bit harder to decode than using Ginkgo's native JSON format.
37203720

37213721
```bash
3722+
# JUnit report
37223723
ginkgo --junit-report=report.xml
3724+
# Teamcity report
3725+
ginkgo --teamcity-report=report.teamcity
3726+
# Go json report (same format as `go test -json`)
3727+
ginkgo --gojson-report=report.go.json
37233728
```
37243729

3725-
The JUnit report is compatible with the JUnit specification, however Ginkgo specs carry much more metadata than can be easily mapped onto the JUnit spec so some information is lost and/or a bit harder to decode than using Ginkgo's native JSON format. Nonetheless, Ginkgo does its best to populate as much of the JUnit report as possible. This includes adding additional metadata using [labels](#spec-labels) - in particular if you provide a label of the form `Label("owner:XYZ")`, the generating JUnit spec will set the `Owner` attribute to `XYZ`.
3730+
Ginkgo does it's best to populate relevant fields and attributes across different report formats. This includes adding additional metadata using [labels](#spec-labels), in particular if you provide a label of the form `Label("owner:XYZ")`, the generated JUnit report will set the `Owner` attribute to `XYZ`.
37263731

3727-
Ginkgo also supports Teamcity reports with `ginkgo --teamcity-report=report.teamcity` though, again, the Teamcity spec makes it difficult to capture all the spec metadata.
3728-
3729-
All the machine-readable reports include the full `-vv` version of the timeline for all specs. This allows you to run Ginkgo in CI with the normal verbosity setting but still get all the detailed information in the machine-readable format.
3732+
All the machine-readable reports include the full `-vv` version of the timeline for all specs. This allows you to run Ginkgo in CI with the normal verbosity setting but still get all the detailed information in the machine-readable format.
37303733

37313734
Of course, you can generate multiple formats simultaneously by passing in multiple flags:
37323735

37333736
```bash
3734-
ginkgo --json-report=report.json --junit-report=report.xml
3737+
ginkgo --json-report=report.json --junit-report=report.xml --gojson-report=report.go.json
37353738
```
37363739

37373740
By default, when any of these command-line report flags are provided Ginkgo will generate a single report file, per format, at the passed-in file name. If Ginkgo is running multiple suites (e.g. `ginkgo -r --json-report=report.json`) then _all_ the suite reports will be encoded in the single report file.

0 commit comments

Comments
 (0)