-
Notifications
You must be signed in to change notification settings - Fork 149
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
Add support for Chromium driver #417
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.
Great research!
+1 for achieving main goal.
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.
So all we have to do is create tasks and solve these problems 😁
@lserwatka this one can be merged |
You can merge it to -ee |
JIRA: https://jira.ez.no/browse/EZP-30669
Related PR: ezsystems/docker-php#39
This PR adds support for Chromium driver in our Docker setup and in Behat/Mink configuration. It will be used as a secondary driver, as Selenium driver does not support response header checking (and we want to use that for some tests in http-cache package).
Looks like Google does not provide any official Docker images with Chromium (unlike Selenium). I've used the image provided by the creator of Chrome integration extension for Mink and Behat.
I've also compared the execution time and potential cost of switching from Selenium to Chrome.
Results:
This is usually solved by increasing SHM size, as suggested here: https://gitlab.com/DMore/chrome-mink-driver/issues/50
But the Chrome in Docker is running with SHM usage disabled - https://gitlab.com/DMore/docker-chrome-headless/blob/7.1/files/supervisord.conf#L47 (meaning it uses tmp, see puppeteer/puppeteer#1834 - it should be somehow improved)
Drag and drops are executed using a JS library (https://github.com/ezsystems/ezplatform-admin-ui/blob/master/src/lib/Behat/lib/drag-mock.js) because Selenium does not support drag and drops between iframes (which is the case for FB and PB).
I haven't investigated it deeply, but I suppose Chromium does have support for file uploads as well 😉
I suppose there is an issue with the selector, it shoudn't be hard to change it.
Given problems 1 and 2 there is no way to compare tests with PB and FB, and given the performance issues there is no way to run the test with fastest. So, here are the results for AdminUI:
Given the speed increase I think we should further investigate the issues, as there is a huge potential here 😉
IMHO the follow-ups should be about:
This is not high-priority, just something we might want to do - the main goal (be able to use a driver with response header checking support) is achieved by this PR.