[Bug 27055] New: Update Firefox version used in Selenium GUI tests
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Bug ID: 27055 Summary: Update Firefox version used in Selenium GUI tests Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: victor@tuxayo.net QA Contact: testopia@bugs.koha-community.org It's currently 47, if it stays like that, we will have to drop these tests at some point. Followup of https://gitlab.com/koha-community/koha-testing-docker/-/issues/203 Past update attempt failed due to like incompatibility/bug between recent Selenium version and our Perl Selenium library (Selenium::Remote::Driver) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |victor@tuxayo.net |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|victor@tuxayo.net |testopia@bugs.koha-communit | |y.org Assignee|chris@bigballofwax.co.nz |victor@tuxayo.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #1 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 113810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113810&action=edit WIP Bug 27055: Fix compatibility with newer Selenium+Firefox version Fix "submit is not a function error" A submit button should be named "submit", in this case, it's id. https://stackoverflow.com/questions/833032/submit-is-not-a-function-error-in... WIP: 1. Fix SCSS which used the id=submit 2. Fix other tests, there are major issues like crash at the beginning or endless duration == Test plan == 1. Update selenium/standalone-firefox to the latest version [1] 2. prove t/db_dependent/selenium/authentication.t 3. It fails with: arguments[0].form.submit is not a function 4. Apply patch 5. Retest 6. Success [1] In koha-testing-docker you can do it with docker-compose.yml selenium: - image: selenium/standalone-firefox:2.53.1-americium + image: selenium/standalone-firefox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |19384 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19384 [Bug 19384] [OMNIBUS] Add Selenium tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113810|0 |1 is obsolete| | --- Comment #2 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 113922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113922&action=edit WIP Bug 27055: Fix compatibility with newer Selenium+Firefox version Fix "submit is not a function error" A submit button should be named "submit", in this case, it's id. https://stackoverflow.com/questions/833032/submit-is-not-a-function-error-in... Fix some uses of get_attribute() Fix with wait_for_element_visible() WIP: 1. Fix SCSS which used the id=submit 2. Fix other tests, there are major issues like crash at the beginning or endless duration == Test plan == 1. Update selenium/standalone-firefox to the latest version [1] 2. prove t/db_dependent/selenium/authentication.t 3. It fails with: arguments[0].form.submit is not a function 4. Apply patch 5. Retest 6. Success [1] In koha-testing-docker you can do it with docker-compose.yml selenium: - image: selenium/standalone-firefox:2.53.1-americium + image: selenium/standalone-firefox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #3 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Got a problem of /dev/shm getting full in the container after a few runs of tests. Tried to reproduce and found another issue instead (which might affect us anyway) "quit() hangs while Firefox is at 100% CPU" https://github.com/SeleniumHQ/docker-selenium/issues/1146 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #4 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
Got a problem of /dev/shm getting full in the container after a few runs of tests.
Ok it's when we don't call quit() a firefox stays there and in recent versions, it uses /dev/shm. TODO follow up to ensure all test files call quit() in the end. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #5 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 114005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114005&action=edit Bug 27055: Fix compatibility with newer Firefox+Selenium version Fix "submit is not a function error" A submit button should not be named "submit", in this case, it's id. https://stackoverflow.com/questions/833032/submit-is-not-a-function-error-in... Fix some uses of get_attribute() Fix a fail by setting a global implicit_wait_timeout, default value is 0 in our lib. Other libs set it higher which helps to not have to manually deal with part of the timing issues. Fix: remove usage of click_when_visible() because it doesn't work with elements not in the top of the page. Because they are off screen. Fix: use $driver->quit() in error_handler to not forget an open Firefox. With the current version, it fills /dev/shm and fails with around 5 Firefox opened. Also use quit() it at the end of every script. Fix: filling item fields, to fill only the displayed one (not those with display:none) == Test plan == 1. Update selenium/standalone-firefox to the latest version [1] 2. prove t/db_dependent/selenium/authentication.t 3. It fails with: arguments[0].form.submit is not a function 4. Apply patch 5. Retest 6. Success [1] In koha-testing-docker you can do it with docker-compose.yml: selenium: - image: selenium/standalone-firefox:2.53.1-americium + image: selenium/standalone-firefox -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113922|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- All Selenium tests were run more than 120 times and no flakiness so far -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Steps after push to master: koha-testing-docker: docker-compose.yml: selenium: - image: selenium/standalone-firefox:2.53.1-americium + image: selenium/standalone-firefox KohaDevBox: Update Selenium URL https://gitlab.com/koha-community/kohadevbox/-/blob/5e9b27d1cb8249431c46215b... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Victor, I don't understand some of the changes, can you explain them? - $self->click_when_visible( $default_submit_selector ); + $self->driver->find_element($default_submit_selector)->click and - $self->click_when_visible( $xpath_selector ); + $self->driver->find_element($xpath_selector)->click
From the commit message: Fix: remove usage of click_when_visible() because it doesn't work with elements not in the top of the page. Because they are off screen.
We are certainly going to reintroduce some random issues we tried to fix during the last cycle. What are the elements at the top, and why are they out of the screen? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Tests are passing but I see lot of occurrences of this error: selenium_1 | [Child 3211, Main Thread] WARNING: fallocate failed to set shm size: No space left on device: file /builds/worker/checkouts/gecko/ipc/chromium/src/base/shared_memory_posix.cc:184 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> ---
Fix: remove usage of click_when_visible() because it doesn't work with elements not in the top of the page. Because they are off screen.
click_when_visible() uses wait_for_element_visible() which now use the current viewport for it's definition of visibility. Thus with elements out of the screen - lower in the page - wait_for_element_visible() waits forever.
We are certainly going to reintroduce some random issues we tried to fix during the last cycle.
Before, the implicit_wait_timeout was 0, now it's 5sec, hopefully that should catch the the bulk of flaky tests. The whole suite was stable during more than 150 runs locally.
fallocate failed to set shm size: No space left on device
This is due to a small /dev/shm and multiple Firefox staying open. Which shouldn't happen as close() is called at the end of each file. And in the error_handler. Remaining Firefox instances can be checked with: docker exec -it koha_selenium_1 bash df -h top Did you interrupt (ctrl-c) the runs several times? Or was it on a freshly started env on the first runs of the tests? That's only way I know for now about how to hit this issue with the new selenium container. ------- Good news, it's possible to change size of /dev/shm :D docker-compose.yml selenium: image: selenium/standalone-firefox + shm_size: 1gb This seems to be a recurring problem for running browsers in docker. As the default is only 64MiB. Testing shows that it doesn't increase the RAM usage, it might work like tmpfs thus only using more RAM as it's filled up. References for the size change: https://stackoverflow.com/questions/58952478/changing-shared-memory-size-in-... https://docs.docker.com/compose/compose-file/#shm_size -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #11 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Merge requests to update koha-testing-docker and KohaDevBox https://gitlab.com/koha-community/koha-testing-docker/-/merge_requests/184 https://gitlab.com/koha-community/kohadevbox/-/merge_requests/285 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114005|0 |1 is obsolete| | --- Comment #12 from Mason James <mtj@kohaaloha.com> --- Created attachment 114584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114584&action=edit Bug 27055: Fix compatibility with newer Firefox+Selenium version Fix "submit is not a function error" A submit button should not be named "submit", in this case, it's id. https://stackoverflow.com/questions/833032/submit-is-not-a-function-error-in... Fix some uses of get_attribute() Fix a fail by setting a global implicit_wait_timeout, default value is 0 in our lib. Other libs set it higher which helps to not have to manually deal with part of the timing issues. Fix: remove usage of click_when_visible() because it doesn't work with elements not in the top of the page. Because they are off screen. Fix: use $driver->quit() in error_handler to not forget an open Firefox. With the current version, it fills /dev/shm and fails with around 5 Firefox opened. Also use quit() it at the end of every script. Fix: filling item fields, to fill only the displayed one (not those with display:none) == Test plan == 1. Update selenium/standalone-firefox to the latest version [1] 2. prove t/db_dependent/selenium/authentication.t 3. It fails with: arguments[0].form.submit is not a function 4. Apply patch 5. Retest 6. Success [1] In koha-testing-docker you can do it with docker-compose.yml: selenium: - image: selenium/standalone-firefox:2.53.1-americium + image: selenium/standalone-firefox Signed-off-by: Mason James <mtj@kohaaloha.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #13 from Mason James <mtj@kohaaloha.com> --- this patch is working well for me with the following patch applied... https://gitlab.com/koha-community/koha-testing-docker/-/merge_requests/184 so signing off :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114584|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 114725 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114725&action=edit Bug 27055: Fix compatibility with newer Firefox+Selenium version Fix "submit is not a function error" A submit button should not be named "submit", in this case, it's id. https://stackoverflow.com/questions/833032/submit-is-not-a-function-error-in... Fix some uses of get_attribute() Fix a fail by setting a global implicit_wait_timeout, default value is 0 in our lib. Other libs set it higher which helps to not have to manually deal with part of the timing issues. Fix: remove usage of click_when_visible() because it doesn't work with elements not in the top of the page. Because they are off screen. Fix: use $driver->quit() in error_handler to not forget an open Firefox. With the current version, it fills /dev/shm and fails with around 5 Firefox opened. Also use quit() it at the end of every script. Fix: filling item fields, to fill only the displayed one (not those with display:none) == Test plan == 1. Update selenium/standalone-firefox to the latest version [1] 2. prove t/db_dependent/selenium/authentication.t 3. It fails with: arguments[0].form.submit is not a function 4. Apply patch 5. Retest 6. Success [1] In koha-testing-docker you can do it with docker-compose.yml: selenium: - image: selenium/standalone-firefox:2.53.1-americium + image: selenium/standalone-firefox Signed-off-by: Mason James <mtj@kohaaloha.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | --- Comment #15 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I tested this with the latest selenium-firefox image. It works after the patch is applied. The changes are sensible. Specially the submit id change. And how things got adjusted makes sense. QA script is happy as well. Well done! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed, to end the year with happy Jenkins. Thanks everyone -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |21.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00 |21.05.00,20.11.01 released in| | Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Pushed to stable |Pushed to oldstable Version(s)|21.05.00,20.11.01 |21.05.00,20.11.01,20.05.07 released in| | --- Comment #18 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.05.00,20.11.01,20.05.07 |21.05.00,20.11.01,20.05.07, released in| |19.11.14 Status|Pushed to oldstable |Pushed to oldoldstable --- Comment #19 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 19.11.x branch for 19.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27055 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |29285 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29285 [Bug 29285] UI tests: Selenium 4 support -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org