Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--junit-report is not working as expected #1152

Open
bnshr opened this issue Mar 2, 2023 · 1 comment
Open

--junit-report is not working as expected #1152

bnshr opened this issue Mar 2, 2023 · 1 comment

Comments

@bnshr
Copy link

bnshr commented Mar 2, 2023

I am running the test suite this way.
ginkgo --junit-report=$JUNIT_OUTPUT -v -p ./test/validation

And JUNIT_OUTPUT="${JUNIT_OUTPUT:-/tmp/artifacts/unit_report.xml}"

When I do not set JUNIT_OUTPUT the default location should be taken. But I get the following error.

  open <fullpath-test-suite>/test/validation/tmp/artifacts/unit_report.xml: no such file or directory
  In [ReportAfterSuite] at: <fullpath-test-suite>/vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go:155 @ 03/02/23 12:37:16.348
------------------------------

Summarizing 1 Failure:
  [FAIL] [ReportAfterSuite] Autogenerated ReportAfterSuite for --junit-report
  <fullpath-test-suite>/vendor/github.com/onsi/ginkgo/v2/reporting_dsl.go:155

Can anyone tell me what is wrong here?
The Ginkgo version is 2.5.1 and I tried 2.8.4 also, no luck.

@onsi
Copy link
Owner

onsi commented Mar 2, 2023

the docs cover this a bit:

https://onsi.github.io/ginkgo/#generating-machine-readable-reports

though it's admittedly not super explicit.

--junit-report should be the file name
--output-dir should be the path to the directory where you want the file stored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants