Skip to content

test: run JUnit 6 browser ITs on the Selenium hub when test.use.hub is set (#27590) (CP: 25.3) - #27685

Open
vaadin-bot wants to merge 1 commit into
25.3from
cherry-pick-27590-to-25.3-1796395358287
Open

vaadin-bot wants to merge 1 commit into
25.3from
cherry-pick-27590-to-25.3-1796395358287

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #27590 to branch 25.3.

The original commit conflicts on 25.3, so this PR picks the 25.4 pick #27684 instead, which already adapted the change to an older branch.

Warning

The cherry-pick had merge conflicts that were resolved automatically by Claude Code. Please review the changes carefully.

Resolution notes from Claude:


Follow-up to #27547

build failure · flow-tests · the nightly dev loop build on bender.vaadin.com

The first nightly dev loop builds on bender failed in every browser IT: the tests started the Chrome installed on the agent, Chrome 115, which Vaadin no longer supports, so each test timed out on the "your browser is not supported" page. With this change the JUnit 6 browser ITs use the Selenium hub on bender, the same as the JUnit 4 tests already do.

Risks:

  • 🔒 The dev loop test applications accept dev tools connections from any host, not only localhost. Test fixtures in dev mode only; nothing outside flow-tests/test-devloop changes.
  • ✅ Without -Dtest.use.hub=true the tests still start a local Chrome on localhost, so GitHub Actions runs are unchanged.

Context. The JUnit 4 base class goes to the hub when test.use.hub is set and opens the application by the agent's IP address; the JUnit 6 base class always started a local Chrome. Flow only lets dev tools connect from localhost, and the dev loop browser ITs need dev tools to bring an applied change into the open page, so a browser on the hub needs devmode.hostsAllowed.

  • AbstractBrowserIT in flow-test-util-junit6 creates a RemoteWebDriver on the hub named by com.vaadin.testbench.Parameters.hubHostname when test.use.hub is set, and builds the root URL from the new getDeploymentHostname(): the site local address on the hub, localhost otherwise
  • DevLoopBrowserIT, DevLoopSpringStatisticsIT and AbstractCspStrictIT open the application by that host name instead of a fixed localhost
  • Every dev loop fixture passes vaadin.devmode.hostsAllowed=* to its server, the same way it already passes vaadin.contentSecurityPolicy; the Spring Boot fixture sets it in application.properties
    • The value is a pom property and not a -D on the build, because the vaadin-dev daemon starts the server through a Maven run of its own

…s set (#27590) (CP: 25.3)

Resolution notes:
- flow-test-util-junit6 (AbstractBrowserIT, #26854) and test-csp-strict (#26734) do not exist on 25.3: dropped the changes to AbstractBrowserIT and AbstractCspStrictIT there.
- On 25.3 DevLoopBrowserIT and DevLoopSpringStatisticsIT extend TestBench BrowserTestBase directly with their own local Chrome driver. The hub driver, hub URL and getDeploymentHostname() logic from the junit6 AbstractBrowserIT moved into a new package-private helper DevLoopBrowsers in test-devloop-support test sources. Both ITs now use it for createDriver() and open AbstractDevLoopIT.rootUrl(DevLoopBrowsers.deploymentHostname()).
- Fixture poms and the Spring application.properties: kept vaadin.devmode.hostsAllowed (and -Djboss.bind.address=0.0.0.0 for JBoss). Dropped the vaadin.contentSecurityPolicy lines from the 25.4 pick because strict CSP for test apps (#27020, #27176) is missing on 25.3.
- Earlier PRs missing on 25.3: #26854, #26734, #27020, #27176.
- Compiled test-devloop-support and test-devloop-spring/devloop-app. The dev loop browser ITs and the nightly fixtures (cargo, tomee, jbosseap, liberty, payara, payara-micro) were not run or built, and neither was the hub path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

Auto merge (with 'squash' method) is enabled for this PR, so it is merged once it is approved and its checks pass. Please review it and approve it, do not merge it manually. [Message is sent from bot]

@vaadin-bot
vaadin-bot enabled auto-merge (squash) December 4, 2026 14:42
@github-actions github-actions Bot added the +0.0.1 label Dec 4, 2026
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

Auto merge (with 'squash' method) is enabled for this PR, so it is merged once it is approved and its checks pass. Please review it and approve it, do not merge it manually. [Message is sent from bot]

@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Test Results

 1 439 files   - 15   1 525 suites   - 15   1h 35m 55s ⏱️ + 15m 9s
12 134 tests  - 11  12 060 ✅  - 18  67 💤 ±0  1 ❌ +1  6 🔥 +6 
12 454 runs   - 50  12 380 ✅  - 57  67 💤 ±0  1 ❌ +1  6 🔥 +6 

For more details on these failures and errors, see this check.

Results for commit bbf201a. ± Comparison against base commit 36a7684.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants