Skip to content
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

Parameterize browser tests to execute them for Edge browser #671 #672

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented May 15, 2023

Browser tests were only executed for the default configuration of a system's browser using the SWT.NONE flag. Other configurations, such as using the Edge browser in Windows, were not tested.

This change parameterizes the browser tests to also execute them for the Edge browser on Windows. It also deactivates those tests for the Edge browser for which the implementation does (currently) not work. This allows to detect regressions when performing future changes to the Edge browser.

Fixes #671

@github-actions
Copy link
Contributor

github-actions bot commented May 15, 2023

Test Results

   485 files   -   1     485 suites   - 1   9m 46s ⏱️ + 2m 39s
 4 319 tests +160   4 305 ✅ +154  12 💤 +4  2 ❌ +2 
16 550 runs  +160  16 452 ✅ +154  96 💤 +4  2 ❌ +2 

For more details on these failures, see this check.

Results for commit b26001f. ± Comparison against base commit c305b75.

This pull request removes 230 and adds 390 tests. Note that renamed tests count towards both.
org.eclipse.swt.graphics.ImageWin32Tests ‑ testImageShouldHaveDimesionAsPerZoomLevel
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_afterPageReload
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_String
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_boolean
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_integer
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_javaReturningInt
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_javaReturningString
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_multipleValues
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_multiprocess
…
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_afterPageReload[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_afterPageReload[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_String[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_String[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_boolean[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_boolean[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_integer[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_BrowserFunction_callback_with_integer[browser flags: 262,144]
…
This pull request removes 5 skipped tests and adds 9 skipped tests. Note that renamed tests count towards both.
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_ClearAllSessionCookies
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_get_set_Cookies
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_events_KeyEvent ‑ testEnglishUs_multipleLetters
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_events_KeyEvent ‑ testEnglishUs_unorderedCtrlC
org.eclipse.swt.tests.win32.Test_org_eclipse_swt_events_KeyEvent ‑ testEnglishUs_unpairedKeyUp
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_ClearAllSessionCookies[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_ClearAllSessionCookies[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_LocationListener_evaluateInCallback[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_OpenWindowListener_evaluateInCallback[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_OpenWindowListener_open_ChildPopup[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_StatusTextListener_hoverMouseOverLink[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_get_set_Cookies[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_get_set_Cookies[browser flags: 262,144]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setForegroundAlphaLorg_eclipse_swt_graphics_Color[browser flags: 262,144]

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare force-pushed the issue-671 branch 8 times, most recently from abe200b to f4ac8dc Compare May 22, 2023 15:49
HeikoKlare added a commit to HeikoKlare/eclipse.platform.swt that referenced this pull request May 22, 2023
…latform#671

Browser tests were only executed for the default configuration of a
system's browser using the SWT.NONE flag. Other configurations, such as
using the Edge browser in Windows, were not tested.

This change parameterizes the browser tests to also execute them for the
Edge browser on Windows. It also deactivates those tests for the Edge
browser for which the implementation does (currently) not work. This
allows to detect regressions when performing future changes to the Edge
browser.

Fixes eclipse-platform#672
@HeikoKlare HeikoKlare force-pushed the issue-671 branch 3 times, most recently from 31c2a39 to 549a829 Compare May 23, 2023 13:57
@HeikoKlare HeikoKlare marked this pull request as ready for review May 23, 2023 15:25
Comment on lines +232 to +253
if (isEdge) {
// wait for and process pending events to properly cleanup Edge browser resources
do {
processUiEvents();
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
} while (Display.getCurrent().readAndDispatch());
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is necessary because otherwise some OS events that are somehow produced by one test occur and are processed by the next test and may interfere with the Edge browser instantation. I have invested quite some time to identify where the events come from and how to properly handle them, but I did not find a proper way to do so. If someone is able to identify the reasons for the events and how to properly process them, I would be glad to have a better solution than this,

@vogella
Copy link
Contributor

vogella commented Jun 14, 2023

@HeikoKlare can this be merged?

@jukzi
Copy link
Contributor

jukzi commented Jun 15, 2023

creating browser took too long: 23469ms
java.lang.AssertionError: creating browser took too long: 23469ms
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser.createBrowser(Test_org_eclipse_swt_browser_Browser.java:290)
	at org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser.setUp(Test_org_eclipse_swt_browser_Browser.java:173)

@HeikoKlare HeikoKlare marked this pull request as draft June 16, 2023 12:26
@HeikoKlare
Copy link
Contributor Author

I converted this back to draft due to the recent test failure and I will have another look at it.
Further increasing the waiting time between test cases would probably "solve"(/hide) the problem, but I'd prefer a solution that makes waiting times between test cases obsolete.

…latform#671

Browser tests were only executed for the default configuration of a
system's browser using the SWT.NONE flag. Other configurations, such as
using the Edge browser in Windows, were not tested.

This change parameterizes the browser tests to also execute them for the
Edge browser on Windows. It also deactivates those tests for the Edge
browser for which the implementation does (currently) not work. This
allows to detect regressions when performing future changes to the Edge
browser.

Fixes
eclipse-platform#671
@HeikoKlare HeikoKlare force-pushed the issue-671 branch 2 times, most recently from ffb43cd to b26001f Compare September 25, 2024 14:39
@sratz sratz added the edge Edge Browser label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
edge Edge Browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Browser tests are not executed for Edge browser
4 participants