xunit and json reporters does not work when specifying an output file
Are you requesting a feature or reporting a bug?
Bug
What is the current behavior?
Running testcafe 'chromium --no-sandbox' -s ./screenshots --screenshots-on-fails --color -r xunit:report.xml returns "ERROR The provided "xunit:report.xml" reporter does not exist. Check that you have specified the report format correctly."
Running testcafe 'chromium --no-sandbox' -s ./screenshots --screenshots-on-fails --color -r json:report.json returns "ERROR The provided "json:report.json" reporter does not exist. Check that you have specified the report format correctly."
Without the :report.format string the reports are shown correctly in the stdout.
What is the expected behavior?
report.xml and report.json files with the sdout should be generated
How would you reproduce the current behavior (if this is a bug)?
testcafe 'chromium --no-sandbox' -s ./screenshots --screenshots-on-fails --color -r xunit:report.xml testcafe 'chromium --no-sandbox' -s ./screenshots --screenshots-on-fails --color -r json:report.json
Specify your
- operating system: MacOs Sierra 10.12.6
- testcafe version: 0.17.2
- node.js version: v8.1.2
Hello @pablorivera !
This feature is not supported in 0.17.2. It is implemented in 0.18.0, so try to upgrade your installation.
Hi @pablorivera,
I'd like to clarify @AndreyBelym's answer. xunit and json reporters are supported in the previous TestCafe versions. In the 0.18.0 version we've introduced the feature which allows to output test results to multiple channels and specify the output file with the -r option.
So, for the 0.17.2 version the correct syntax is: testcafe chrome test.js -r xunit > report.xml (standart output redirection is used here).
Since 0.18.0 you can use: testcafe chrome test.js -r xunit:report.xml or testcafe chrome test.js -r xunit:report.xml,json:report.json (built-in TestCafe syntax is used here).
Feel free to reopen the issue if you still have some problems here.
Hi guys, thanks for the clarification. Upgrading to 0.18.1 worked!
You are always welcome!
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.