Skip to content

Keep cypress video on demand#10558

Open
archibald1418 wants to merge 3 commits intodevelopfrom
ov/e2e-keep-video-on-demand
Open

Keep cypress video on demand#10558
archibald1418 wants to merge 3 commits intodevelopfrom
ov/e2e-keep-video-on-demand

Conversation

@archibald1418
Copy link
Copy Markdown
Contributor

@archibald1418 archibald1418 commented May 4, 2026

By default, our cypress configuration unlinks a video file after a run.
While writing a test, we need to see videos even for successful runs. Usually this is done by uncommenting fs.unlinkSync(results.video);, which is error-prone and leads to accidental commits made into the index.js file, messing up commit history. This PR gives an option to override the file unlinking for troublehooting using an env variable

Added usage example into docs

Usage

VIDEO=1 yarn cypress run --headless --browser chrome --spec <spec_file>

Motivation and context

Enhancement PR

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@archibald1418 archibald1418 requested a review from klakhov May 4, 2026 11:19
@archibald1418 archibald1418 requested a review from bsekachev as a code owner May 4, 2026 11:19
@archibald1418 archibald1418 added enhancement New feature or request tests labels May 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Set a `VIDEO` environment variable if you need to keep `Cypress`'s video of a test run

```bash
VIDEO=1 npx cypress --headless --browser chrome --spec cypress/e2e/...
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should use yarn here as our docs for tests usually refer to yarn?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced to yarn

@archibald1418 archibald1418 requested a review from klakhov May 5, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants