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

TestCafe launched via CLI does not print reporter's stderr in the console since 1.15.0 #6842

Closed
VasilyStrelyaev opened this issue Jan 28, 2022 · 2 comments · Fixed by #6875
Closed
Assignees
Labels
Dashboard TYPE: bug The described behavior is considered as wrong (bug).

Comments

@VasilyStrelyaev
Copy link
Collaborator

What is your Scenario?

Try the following reporter stab to reproduce the issue:

module.exports = function () {
    console.log('Hello world!');
    console.error('Oh, you don\'t say!');

    return {
        noColors: true,
        
        reportTaskStart (/* startTime, userAgents, testCount */) {
        },

        reportFixtureStart (/* name, path */) {
        },

        reportTestStart (/* name, testMeta */) {
        },

        reportTestDone (/* name, testRunInfo */) {
        },

        reportTaskDone (/* endTime, passed, warnings */) {
        }
    };
};

What is the Current behavior?

Hello world!

What is the Expected behavior?

Hello world!
Oh, you don't say!

What is your public website URL? (or attach your complete example)

What is your TestCafe test code?

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. Generate an empty reporter (testcafe-reporter-foobar) with the Yeoman generator
  2. Add the abovementioned console.log and console.error lines:
    console.log('Hello world!');
    console.error('Oh, you don\'t say!');
  3. npm link the module
  4. Use the reporter when running any test:
    testcafe chrome test.js --reporter foobar

(you may also have to check the reporter's main setting in package.json because it's not generated correctly by generator-testcafe-reporter).

TestCafe version

1.15.0 +

Node.js version

No response

Command-line arguments

Browser name(s) and version(s)

No response

Platform(s) and version(s)

No response

Other

No response

@VasilyStrelyaev VasilyStrelyaev added the TYPE: bug The described behavior is considered as wrong (bug). label Jan 28, 2022
@VasilyStrelyaev VasilyStrelyaev changed the title TestCafe does not print reporter's stderr in the console since 1.15.0 TestCafe launched via CLI does not print reporter's stderr in the console since 1.15.0 Jan 28, 2022
@AndreyBelym AndreyBelym self-assigned this Feb 9, 2022
@VasilyStrelyaev
Copy link
Collaborator Author

VasilyStrelyaev commented Feb 16, 2022

Indeed, your commit fixes the example with an empty reporter... Thank you!
But it sadly does not seem to fix the dashboard reporter.

New steps to reproduce:

  1. npm install testcafe-reporter-dashboard
  2. export TESTCAFE_DASHBOARD_AUTHENTICATION_TOKEN= (yes, empty, to generate an error)
  3. testcafe chrome test.js --reporter dashboard

No errors printed.

If you now modify the reporter's node_modules/testcafe-reporter-dashboard/lib/logger.js - change console.error and console.warn to console.log - errors will be displayed.

@VasilyStrelyaev
Copy link
Collaborator Author

Can confirm that with 1.18.4-rc.3 the reporter prints the errors as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants