[ZEPPELIN-6195] Fix Selenium tests by switching from Chrome to Firefox and upgrading outdated Spark#4941
Conversation
…rome/ChromeDriver to 125 and upgrading selenium-java to 4.20.0
|
Thank you for wanting to correct the Selenium tests. I see that your solution works. However, I find the downgrade very problematic, as it is not future-proof. I had also looked at the problem some time ago and found a problem with the maximize method. The problem with Selenium is analyzed in more detail here. I would suggest a fixed height and width. Unfortunately, my initial tests were not successful. Perhaps you can find suitable values. I like the update of the Selenium version, but not the downgrade of Chrome. |
|
@Reamer |
|
The issue looks to be there for a long time, if it is specific to Chrome, how about switching the test to Firefox? |
|
Firefox has other bugs as far as I remember |
… maximize window issue
Reamer
left a comment
There was a problem hiding this comment.
Thank you for looking at the issue again. In my opinion, too much useful code for other platforms has been removed.
…fox in integration tests
…to improve test stability
|
I see the failed |
Reamer
left a comment
There was a problem hiding this comment.
Please completely revert your changes to the run-e2e-tests-in-zeppelin-web test. We should stick with one frontend test for this pull request and not touch both.
…state and scope Firefox setting to spark-3-5 job only
Reamer
left a comment
There was a problem hiding this comment.
The question still needs to be clarified.
|
@ParkGyeongTae thanks for fixing this, could you please update the PR title and description to reflect the final solution? |
|
@pan3793 |
…x and upgrading outdated Spark ### What is this PR for? The `test-selenium-with-spark-module-for-spark-3-4` job in GitHub Actions was consistently failing with the error: ```bash from unknown command: 'Runtime.evaluate' wasn't found ``` This issue was caused by ChromeDriver not recognizing the `Runtime.evaluate` command. To resolve it, the browser used in the test was switched from Chrome to Firefox. During the migration to Firefox, another issue occurred: ```bash Unable to download from https://dlcdn.apache.org/spark/spark-3.4.2/spark-3.4.2-bin-hadoop3.tgz java.io.FileNotFoundException: https://dlcdn.apache.org/spark/spark-3.4.2/spark-3.4.2-bin-hadoop3.tgz ``` This was due to the Spark 3.4.2 binaries no longer being available from the Apache mirror. The test environment was therefore updated to use Spark 3.5.6, which resolved the download problem. Summary of changes: - Switched Selenium tests from Chrome to Firefox (non-snap) using geckodriver. - Updated Spark version in the test environment from 3.4.2 to 3.5.6 to fix missing binary downloads. Before: test-selenium-with-spark-module-for-spark-3-4 (Chrome, Spark 3.4.2) After: test-selenium-with-spark-module-for-spark-3-5 (Firefox, Spark 3.5.6) ### What type of PR is it? Bug Fix ### Todos * [x] - Verified that other integration tests (if any) are not affected * [x] - Confirmed long-term compatibility with the Chrome for Testing approach ### What is the Jira issue? * Jira: https://issues.apache.org/jira/browse/ZEPPELIN-6195 ### How should this be tested? - Run the `test-selenium-with-spark-module-for-spark-3-4` job in GitHub Actions. - Verify that `AuthenticationIT` and any other affected Selenium tests pass without encountering `Runtime.evaluate` errors. ### Screenshots (if appropriate) N/A ### Questions: * Does the license files need to update? No. * Is there breaking changes for older versions? No. * Does this needs documentation? No. Closes #4941 from ParkGyeongTae/fix-selenium-runtime-evaluate-error. Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com> (cherry picked from commit 8ec487f) Signed-off-by: Philipp Dallig <philipp.dallig@gmail.com>
|
Merged into master and branch-0.12 |
### What is this PR for? This PR stabilizes the `test-selenium...` job by switching the Selenium browser from Firefox to Microsoft Edge. In #4941, we worked around a Linux ChromeDriver issue (SeleniumHQ/selenium#15358) by moving from Chrome to Firefox, but that workaround also seems to be not working well. I use Edge driver instead, since it does not have flakiness like Firefox driver and is more aligned with Chrome since it is also based on Chromium. Limitation: The root cause of Firefox browser failures has not been fully analyzed. ### What type of PR is it? Bug Fix ### What is the Jira issue? [[ZEPPELIN-6350]](https://issues.apache.org/jira/browse/ZEPPELIN-6350) ### How should this be tested? - Check `test-selenium...` job in `frontend` ### Questions: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Closes #5089 from tbonelee/fix-selenium-test. Signed-off-by: Chan Lee <chanho0325@gmail.com>
### What is this PR for? This PR stabilizes the `test-selenium...` job by switching the Selenium browser from Firefox to Microsoft Edge. In #4941, we worked around a Linux ChromeDriver issue (SeleniumHQ/selenium#15358) by moving from Chrome to Firefox, but that workaround also seems to be not working well. I use Edge driver instead, since it does not have flakiness like Firefox driver and is more aligned with Chrome since it is also based on Chromium. Limitation: The root cause of Firefox browser failures has not been fully analyzed. ### What type of PR is it? Bug Fix ### What is the Jira issue? [[ZEPPELIN-6350]](https://issues.apache.org/jira/browse/ZEPPELIN-6350) ### How should this be tested? - Check `test-selenium...` job in `frontend` ### Questions: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Closes #5089 from tbonelee/fix-selenium-test. Signed-off-by: Chan Lee <chanho0325@gmail.com> (cherry picked from commit 3d1ee7c) Signed-off-by: Chan Lee <chanho0325@gmail.com>
What is this PR for?
The
test-selenium-with-spark-module-for-spark-3-4job in GitHub Actions was consistently failing with the error:This issue was caused by ChromeDriver not recognizing the
Runtime.evaluatecommand.To resolve it, the browser used in the test was switched from Chrome to Firefox.
During the migration to Firefox, another issue occurred:
This was due to the Spark 3.4.2 binaries no longer being available from the Apache mirror.
The test environment was therefore updated to use Spark 3.5.6, which resolved the download problem.
Summary of changes:
Before: test-selenium-with-spark-module-for-spark-3-4 (Chrome, Spark 3.4.2)
After: test-selenium-with-spark-module-for-spark-3-5 (Firefox, Spark 3.5.6)
What type of PR is it?
Bug Fix
Todos
What is the Jira issue?
How should this be tested?
test-selenium-with-spark-module-for-spark-3-4job in GitHub Actions.AuthenticationITand any other affected Selenium tests pass without encounteringRuntime.evaluateerrors.Screenshots (if appropriate)
N/A
Questions: