-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Getting flaky tests back in shape for reporting #46076
Getting flaky tests back in shape for reporting #46076
Conversation
💚 Build Succeeded |
retest |
💔 Build Failed |
Looks like failures elsewhere |
|
||
return new class DashboardAddPanel { | ||
// Dev-helper to pause the browser so we can inspect what's going on | ||
// Not meant for usage in CI since it'll stop all execution |
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.
Added this so you can pause the browser in places where you need to inspect stuff. Might need a better home than this file (common?)
Getting unrelated failures, merged master. |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
Some notes:
|
@@ -79,6 +80,10 @@ async function attemptToCreateCommand(log: ToolingLog, browserType: Browsers) { | |||
// See: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md | |||
chromeOptions.push('headless', 'disable-gpu'); | |||
} |
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.
I've added this so you can remotely debug (view with devtools) the session as it's running headlessly
@@ -89,6 +89,7 @@ uiModules.get('kibana') | |||
const downloadReportButton = ( | |||
<EuiButton | |||
size="s" |
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.
This is my hack to get the URL of the report, vs clicking on it and trying to navigate to that Tab in webdriver, which appears to not be working in headless (just freezes or crashes there). A pro is that this speeds up the tests!
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.
This is genius!
@@ -30,34 +30,6 @@ export function ReportingPageProvider({ getService, getPageObjects }) { | |||
await browser.setWindowSize(1600, 850); | |||
} | |||
|
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.
No longer need theses now that we aren't tab-switching
💔 Build Failed |
💚 Build Succeeded |
retest |
Unrelated failure, our CI group passed. Merging master and pushing |
💔 Build Failed |
💚 Build Succeeded |
restest |
* @return {Promise<void>} | ||
*/ | ||
public async pause() { | ||
await driver.executeAsyncScript(`(async () => { debugger; return Promise.resolve(); })()`); |
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.
When/If this turns out to be useful, can you add a note in some developer docs about how to use this?
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.
Ah! Great reminder, thanks!
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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!
Reviewed the code
@elasticmachine merge upstream |
One more run, then we'll see how the stress test does |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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.
👍 on the license checker changes.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
@joelgriffith this PR would close #23842 correct? |
* Rebasing from master, updating test utils and getting report pdf/png generation * Removing legacy functions, packages and updating README/Licenses * Dropping duplicitive test * Better URL check for lens reporting Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This PR re-enables prior skipped flaky tests for reporting. A couple of highlights
Switching tabs to view the downloaded report broke in headless selenium. We fixed that by taking the URL of the report and downloaded it manually.
I’ve added an extra env variable to force a remote debugging port so we can remote debug headless
Added a new method to pause the browsers execution so we can see what’s going on at that exact moment.