-
Notifications
You must be signed in to change notification settings - Fork 512
feat(CI): Upload e2e error videos to GitHub #6023
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
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c84aa4d
Upload e2e errors to GHA (Sonnet 4)
emyller deccef2
Don't change the team's workflow dang it (Sonnet 4)
emyller 35d0722
Sound less like AI (Sonnet 4)
emyller 71718ee
Improve documentation (Sonnet 4)
emyller d8d6485
💅
emyller dcbfa96
Use GitHub Actions artifacts for E2E test videos
emyller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # E2E Test Video Recording | ||
|
|
||
| This document explains how to access video recordings of failed E2E tests from GitHub Actions. | ||
|
|
||
| ## Overview | ||
|
|
||
| The E2E tests are configured to automatically record videos of **failed tests only** and upload them as GitHub Actions artifacts. | ||
|
|
||
| ## How it works | ||
|
|
||
| **TestCafe Configuration**: The `.testcaferc.js` file is configured with: | ||
| - `failedOnly: true` - Only records videos when tests fail. | ||
| - Videos are saved to `reports/screen-captures/`. | ||
| - Files are named with environment, timestamp, and test index for easy identification. | ||
|
|
||
| **GitHub Actions Artifacts**: | ||
| - Videos are automatically uploaded as artifacts when tests fail. | ||
| - Artifacts are retained for 30 days. | ||
| - Different workflows use different artifact names: | ||
| - `e2e-failed-test-videos-{environment}-{run_attempt}` for direct e2e-tests action | ||
| - `e2e-failed-test-videos-docker-{run_attempt}` for Docker-based tests | ||
| - `e2e-failed-test-videos-manual-{run_attempt}` for manual test runs | ||
|
|
||
| ## Accessing Video Recordings | ||
|
|
||
| 1. Go to the failed GitHub Actions run. | ||
| 2. Scroll down to the "Artifacts" section at the bottom of the run page. | ||
| 3. Download the video artifact(s) to view the recordings of failed tests. | ||
|
|
||
| ## Configuration | ||
|
|
||
| The video recording behavior is controlled by: | ||
| - TestCafe configuration in `.testcaferc.js` - controls video quality, path, and naming | ||
| - GitHub Actions workflow files - handle the artifact upload | ||
|
|
||
| ## Video Settings | ||
|
|
||
| - **Format**: MP4 | ||
| - **Frame rate**: 20 FPS | ||
| - **Aspect ratio**: 4:3 | ||
| - **Recording**: Only when tests fail | ||
| - **GitHub Actions Retention**: 30 days | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - If no videos appear in artifacts, check that tests actually failed (videos are only recorded on failure). | ||
| - For Docker-based tests, ensure the video extraction step completed successfully. | ||
| - Check the test logs for any video-related error messages. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate artifact names when matrix jobs fail simultaneously
The artifact name
e2e-failed-test-videos-docker-${{ github.run_attempt }}does not include any matrix-distinguishing identifier. This reusable workflow is called with a matrix strategy (e.g., two different runners inplatform-pull-request.yml). If multiple matrix jobs fail, they all try to upload artifacts with the same name. Withactions/upload-artifact@v4, duplicate artifact names cause an upload error, so only the first failing job's video gets uploaded while subsequent ones fail silently. The name needs to include${{ inputs.runs-on }}or similar to be unique.