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

[Feature]: Make list reporter's printSteps option work on non-TTY #31674

Closed
acidoxee opened this issue Jul 13, 2024 · 0 comments · Fixed by #31703
Closed

[Feature]: Make list reporter's printSteps option work on non-TTY #31674

acidoxee opened this issue Jul 13, 2024 · 0 comments · Fixed by #31703
Assignees
Labels

Comments

@acidoxee
Copy link

acidoxee commented Jul 13, 2024

🚀 Feature Request

Currently, CI environments like GitHub Actions don't have a TTY mode. Playwright straight up disables the printSteps option of the list reporter in that case, except if PLAYWRIGHT_FORCE_TTY is passed, but then the output is quite broken.

It would be great if the list reporter's printSteps option could still work for non-TTY modes, even if it's with a "degraded" output/features compared to the TTY-enabled one.

Example

The following config would work as expected and provide useful feedback for test steps in CI/non-TTY mode:

import { defineConfig } from '@playwright/test';

export default defineConfig({
  reporter: process.env.CI === 'true'
    ? [['list', { printSteps: true }], ['github']]
    : [['list', { printSteps: true }]],
});

Motivation

This would be beneficial to monitor the ongoing status of tests in CI for instance, where output is quite limited for long-running tests. Test steps are a great way to provide feedback during each test's execution, but this doesn't work in most CI environments right now since they don't have a TTY mode.

We're currently running Playwright in CI with DEBUG=pw:api to provide feedback, but it's obviously extremely verbose and drowns useful information. Having test steps' logs display properly instead would be enough for us to know what's going on during long tests.

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

Successfully merging a pull request may close this issue.

3 participants