Skip to content

Commit 79f10c9

Browse files
committed
Add Chrome flags in integration tests
- Export `DBUS_SESSION_BUS_ADDRESS` to avoid session errors during tests. - Add Chrome stability flags for improved reliability in Docker/CI environments. - Add chrome driver logging
1 parent 4c29c36 commit 79f10c9

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

scripts/integration_tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ function main() {
9292
exit 1
9393
fi
9494

95+
if [[ -z "${DBUS_SESSION_BUS_ADDRESS}" ]]; then
96+
export DBUS_SESSION_BUS_ADDRESS=/dev/null
97+
fi
98+
export CHROME_LOG_FILE=${wd}/chrome.log
9599
eval "$integration_test_code"
96100

97101
# Clean up: kill the boot server

uaa/src/test/java/org/cloudfoundry/identity/uaa/integration/feature/DefaultIntegrationTestConfig.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,33 @@ private static ChromeOptions getChromeOptions() {
8181
"--allow-running-insecure-content",
8282
"--allow-insecure-localhost",
8383
"--no-sandbox", // Required for Docker/CI environments
84-
"--disable-dev-shm-usage", // Overcome limited resource problems in Docker
8584
"--disable-gpu",
85+
"--remote-allow-origins=*",
86+
"--disable-dev-shm-usage", // Overcome limited resource problems in Docker
87+
"--enable-logging",
88+
// Additional stability flags
8689
"--disable-extensions",
8790
"--disable-software-rasterizer",
8891
"--disable-background-timer-throttling",
8992
"--disable-backgrounding-occluded-windows",
9093
"--disable-renderer-backgrounding",
91-
"--remote-allow-origins=*"
94+
"--disable-blink-features=AutomationControlled",
95+
"--disable-features=TranslateUI",
96+
"--disable-ipc-flooding-protection",
97+
"--disable-hang-monitor",
98+
"--disable-prompt-on-repost",
99+
"--disable-sync",
100+
"--disable-component-extensions-with-background-pages",
101+
"--force-color-profile=srgb",
102+
"--metrics-recording-only",
103+
"--enable-features=NetworkService,NetworkServiceInProcess",
104+
"--disable-features=VizDisplayCompositor",
105+
"--no-first-run",
106+
"--no-default-browser-check",
107+
"--disable-default-apps",
108+
"--disable-popup-blocking",
109+
"--test-type",
110+
"--disable-infobars"
92111
);
93112
options.setAcceptInsecureCerts(true);
94113

0 commit comments

Comments
 (0)