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

The 'reporter' option from configuration file is not applied #6665

Closed
ssallmen opened this issue Oct 28, 2021 · 1 comment · Fixed by #6672
Closed

The 'reporter' option from configuration file is not applied #6665

ssallmen opened this issue Oct 28, 2021 · 1 comment · Fixed by #6672

Comments

@ssallmen
Copy link

The reporter works with TestCafe 1.16.0 but not anymore with 1.16.1, with exactly the same configuration.

Here you can see the TestCafe config file used in TestCafe runs:

PS C:\Project> type testcafe.config.test.json
{
  "browsers": "firefox",
  "src": "C:\\Project\\*.test.js",
  "filter": {
    "fixture": "First Testcafe suite"
  },
  "reporter": "xunit"
}

And here is the functionality when version 1.16.0 of TestCafe is installed:

PS C:\Project> testcafe --version
Using locally installed version of TestCafe.
1.16.0

PS C:\Project> testcafe --config-file C:\Project\testcafe.config.test.json --reporter xunit
Using locally installed version of TestCafe.
The "reporter" option from the configuration file will be ignored.
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite name="TestCafe Tests: Firefox 91.0 / Windows 10" tests="1" failures="0" skipped="0" errors="0" time="3.116" timestamp="Thu, 28 Oct 2021 13:27:51 GMT" >
  <testcase classname="First Testcafe suite" name="My Test" time="3.101">
  </testcase>
</testsuite>

Let's then uninstall TestCafe and install the latest version, and run with the same command again:

PS C:\Project> npm uninstall testcafe
removed 1 package in 2.028s

PS C:\Project> npm install testcafe
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated

+ testcafe@1.16.1
updated 3 packages and audited 455 packages in 15.423s

found 0 vulnerabilities

PS C:\Project> testcafe --version
Using locally installed version of TestCafe.
1.16.1

PS C:\Project> testcafe --config-file C:\Project\testcafe.config.test.json
Using locally installed version of TestCafe.
 Running tests in:
 - Firefox 91.0 / Windows 10

 First Testcafe suite
 √ User Johnny Boy


 1 passed (3s)

As you can see, there is no xunit report in stdout anymore, but the default list reporter is used instead. Functionality is the same when TestCafe is installed globally.

@miherlosev miherlosev transferred this issue from DevExpress/testcafe-reporter-xunit Nov 1, 2021
@need-response-app need-response-app bot added the STATE: Need response An issue that requires a response or attention from the team. label Nov 1, 2021
@miherlosev miherlosev changed the title xUnit reporter does not work with TestCafe version 1.16.1 The 'reporter' option from configuration file is not applied Nov 1, 2021
@miherlosev
Copy link
Collaborator

Hi @ssallmen

Thank you for the shared example. I've reproduced the issue.

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

Successfully merging a pull request may close this issue.

4 participants