-
Notifications
You must be signed in to change notification settings - Fork 2.8k
V16 QA Publish Console Error Logs #19417
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
Conversation
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.
Pull Request Overview
This PR adds support for capturing frontend console errors during E2E runs by initializing a console-errors.json file, wiring up a new CONSOLE_ERRORS_PATH environment variable, and publishing the log as a pipeline artifact.
- Ensure
console-errors.jsonis created/prepared in the postinstall script - Extend
.envgeneration andconfig.jsto includeCONSOLE_ERRORS_PATH - Update nightly/azure pipelines to capture and publish the console error log
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Umbraco.Tests.AcceptanceTest/postinstall.js | Initialize console-errors.json when missing |
| tests/Umbraco.Tests.AcceptanceTest/config.js | Add CONSOLE_ERRORS_PATH to generated .env and cleanup duplicates |
| tests/Umbraco.Tests.AcceptanceTest/package.json | Bump @umbraco/playwright-testhelpers dependency version |
| build/nightly-E2E-test-pipelines.yml | Export CONSOLE_ERRORS_PATH and copy the log as an artifact |
| build/azure-pipelines.yml | Export CONSOLE_ERRORS_PATH and copy the log as an artifact |
Files not reviewed (1)
- tests/Umbraco.Tests.AcceptanceTest/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
tests/Umbraco.Tests.AcceptanceTest/postinstall.js:24
- Consider adding an automated test to verify that
postinstall.jscreatesconsole-errors.jsonwhen it does not exist, ensuring this new behavior doesn't regress.
fs.writeFileSync(consoleErrorsPath, consoleErrorsFileContent);
nhudinh0309
left a comment
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.
It looks good but in the pipeline, where can I view the file which write the console log?
|
The console logs are in the same place as the trace.zips from our failed/flaky tests. In the published artefacts > Anyof the test workers > console-errors.json |
nhudinh0309
left a comment
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.
LGTM
This PR focuses on logging all the Console Errors from the frontend while running our E2E test.
It allows us to see any errors we do not see in the UI while running the tests.