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

Cannot Run Example for Multiple Reporters #8359

Open
GuacoIV opened this issue Jan 9, 2025 · 2 comments
Open

Cannot Run Example for Multiple Reporters #8359

GuacoIV opened this issue Jan 9, 2025 · 2 comments
Labels
TYPE: bug The described behavior is considered as wrong (bug).

Comments

@GuacoIV
Copy link

GuacoIV commented Jan 9, 2025

What is your Scenario?

I'd like to output the results to two reporters using command line arguments. I have found that even the provided example here My real-world scenario is to output to spec and testcafe-reporter-testrail as shown here however I will focus on the former example for simplicity.

What is the Current behavior?

I receive the following error:

ERROR Failed to load the "spec xunit" reporter. Please check the parameter for errors. Error details:

Cannot find module 'testcafe-reporter-spec xunit'

But I find that if I configure the multiple reports in a .testcaferc.json configuration file then it works fine. So it seems to be a command parsing issue or misaligned documentation.

What is the Expected behavior?

Tests begin to run

What is the public URL of the test page? (attach your complete example)

(not needed)

What is your TestCafe test code?

(any)

Your complete configuration file

The failing scenario it is simply:

{
{

And in the workaround scenario:

{
    "reporter": [
        {
            "name": "spec"
        },
        {
            "name": "xunit",
            "output": "report.xml"
        }
    ]
}

Your complete test report

Using locally installed version of TestCafe.
ERROR Failed to load the "spec xunit" reporter. Please check the parameter for errors. Error details:

Cannot find module 'testcafe-reporter-spec xunit'

Type "testcafe -h" for help.

Screenshots

No response

Steps to Reproduce

Simply run the command testcafe chrome getting-started.js -r spec,xunit:report.xml

TestCafe version

3.7.0

Node.js version

v22.11.0

Command-line arguments

testcafe chrome getting-started.js -r spec,xunit:report.xml

Browser name(s) and version(s)

Chrome 131

Platform(s) and version(s)

Windows 11

Other

No response

@GuacoIV GuacoIV added the TYPE: bug The described behavior is considered as wrong (bug). label Jan 9, 2025
@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Jan 9, 2025
@aleks-pro
Copy link
Contributor

Hello @GuacoIV ,

Thank you for reporting the issue. I have managed to reproduce it. It appears to affect TestCafe test execution only in Node.js of version 22. We will investigate the issue and update this thread once we have any progress.

As a workaround, please enclose the reports list in double quotes as follows:

testcafe chrome getting-started.js -r "spec,xunit:report.xml"

@testcafe-need-response-bot testcafe-need-response-bot bot removed the STATE: Need response An issue that requires a response or attention from the team. label Jan 14, 2025
@GuacoIV
Copy link
Author

GuacoIV commented Jan 17, 2025

Ah yes, that workaround does work perfectly! That's for repro-ing, investigating, and providing the workaround.

@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Jan 17, 2025
@aleks-pro aleks-pro removed the STATE: Need response An issue that requires a response or attention from the team. label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants