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

Plugin stdout not captured as part of stdout during run record #7434

Closed
kuceb opened this issue May 20, 2020 · 3 comments · Fixed by #17293
Closed

Plugin stdout not captured as part of stdout during run record #7434

kuceb opened this issue May 20, 2020 · 3 comments · Fixed by #17293
Assignees
Labels
topic: plugins ⚙️ type: enhancement Requested enhancement of existing feature

Comments

@kuceb
Copy link
Contributor

kuceb commented May 20, 2020

currently we capture run stdout for recording by intercepting process.stdout.write, however that will only capture the stdout from the parent process, missing the plugins

We should capture stdout from the plugins as well

We likely should spawn plugins with { stdio: 'pipe' } instead of inherit and manually forward the stdout to the parent

@jennifer-shehane jennifer-shehane added the type: enhancement Requested enhancement of existing feature label May 21, 2020
@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label May 21, 2020
@jennifer-shehane
Copy link
Member

jennifer-shehane commented May 21, 2020

The reason this is important - if you console.log output through the plugins/index.js, they will show up in the terminal when you run cypress run, but they will not show up captured later in the Dashboard stdout.

Something like:

plugins/index.js

module.exports = (on) => {
  on('task', {
    logStdOut(...args) {
      console.log(...args);
      return null;
    },
  });
};

Also using plugins that log output would not log the output through the Dashboard like:

@cypress-bot cypress-bot bot added stage: backlog and removed stage: ready for work The issue is reproducible and in scope labels May 18, 2021
@cypress-bot cypress-bot bot removed the stage: to do label Jun 8, 2021
@cypress-bot cypress-bot bot added stage: work in progress There is an open PR for this issue [WIP] stage: needs review The PR code is done & tested, needs review and removed stage: to do stage: work in progress There is an open PR for this issue [WIP] labels Jul 12, 2021
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Jul 13, 2021
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 13, 2021

The code for this is done in cypress-io/cypress#17293, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 20, 2021

Released in 8.0.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v8.0.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: plugins ⚙️ type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants