8000 System test robustness by etiennebarrie · Pull Request #1189 · Shopify/maintenance_tasks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

System test robustness #1189

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

Merged
merged 6 commits into from
Mar 20, 2025
Merged

System test robustness #1189

merged 6 commits into from
Mar 20, 2025

Conversation

etiennebarrie
Copy link
Member

We paired with @adrianna-chang-shopify on improving the stability of system tests.

We found a few issues related the code, but a lot of it is related to changes to Chrome 134 it seems:

SeleniumHQ/selenium#15401
teamcapybara/capybara#2800

Last commit is a hack to make sure Capybara retries when the element is no longer on the page because it's something it's always done, and now it just considers them unknown errors. This will need to be reverted once things have settled.

etiennebarrie and others added 6 commits March 20, 2025 15:50
Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
This causes flakiness when we're navigating pages because Capybara goes
back to the browser to check for the visibility of the node, which
doesn't exist anymore.

Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
A lot of flakiness seems to come from the fact that the errors changed
for invalid elements:

{"code":-32000,"message":"Node with given id does not belong to the document"}

This is a hack that handles all unknown errors as invalid element
errors.

Co-authored-by: Adrianna Chang <adrianna.chang@shopify.com>
Copy link
Contributor
@nvasilevski nvasilevski left a comment

Choose a reason for hiding this comment

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

Thanks!

@etiennebarrie
Copy link
Member Author
etiennebarrie commented Mar 20, 2025

We've also tried to only apply the hack in 56d9ccb, but the other changes were necessary because the tests were flaky in the first place, see #1176.

@etiennebarrie
Copy link
Member Author
etiennebarrie commented Mar 20, 2025

Actually the commit that disables checking for the visibility of elements might not be a good idea. We don't use invisible elements at all so I'll let that slip in, but for reference for the future, if this cause an issue, feel free to revert 2105366.

@etiennebarrie etiennebarrie merged commit be26f21 into main Mar 20, 2025
39 checks passed
@etiennebarrie etiennebarrie deleted the system-test-robustness branch March 20, 2025 16:31
@etiennebarrie etiennebarrie mentioned this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0