Ability to connect to a browser over websocket instead of running local executable? #464
Replies: 3 comments
-
This issue is stale because it has been open for more than 14 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Beta Was this translation helpful? Give feedback.
-
Hello Percy team! Is this something you'd consider? I think it could be done without a very invasive change to the SDK. |
Beta Was this translation helpful? Give feedback.
-
Hey @geoffharcourt! At the moment we're not super open to it. If we did consider something like this, it'd have to throw a "I really hope you know what you're doing" warning each time since it won't launch with any of the flags we control/test with: Changing the asset discovery browser usually makes things unstable -- it's the main reason why we dropped Puppeteer (the version of Chrome would change and cause all kinds of hidden issues). This would make me pretty uneasy to introduce and maybe go as far as saying we couldn't provide support for anything that would use this option. Edit: I will say it is a neat idea and I dig it. But I think in userland this would be impossible to help people with in support. And it feels odd/bad to add a feature to our SDKs that basically opts you out of any support |
Beta Was this translation helpful? Give feedback.
-
Hello Percy team!
We currently run our browser-based tests using Chrome in a separate container from our application. There's a few reasons for doing this, including making it easy for us to swap out different versions of Chrome for testing, minimizing Docker image size, etc. We currently end up installing Chromium in order to have something present for asset discovery, but it's only used by Percy.
It looks like you're now controlling the browser over a websocket now as you're moving away from being coupled to Puppeteer. Would you be open to a change where a user could supply an environment variable like
PERCY_REMOTE_BROWSER_URL
and when that is present, the executable-launching (and installing) steps would be bypassed and the URL would be used to connect here:cli/packages/core/src/discovery/browser.js
Line 75 in cc7fa1b
This would save us a 130MB of install in some of our CI images but also would let us get rid of a lot of complexity, as Chrome and Chromium are kind of awkward to use in Alpine Linux.
Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions