Skip to content

Upgrade HtmlUnit to 5 - #37194

Merged
bclozel merged 1 commit into
spring-projects:mainfrom
blackdurumi:fix/37075-htmlunit-5-upgrade
Aug 28, 2026
Merged

Upgrade HtmlUnit to 5#37194
bclozel merged 1 commit into
spring-projects:mainfrom
blackdurumi:fix/37075-htmlunit-5-upgrade

Conversation

@blackdurumi

Copy link
Copy Markdown
Contributor

Fixes #37075

This updates Spring Test's HtmlUnit integration to HtmlUnit 5 and the compatible Selenium HtmlUnit driver release.

Changes:

  • Upgrade org.htmlunit:htmlunit to 5.4.0.
  • Upgrade htmlunit3-driver and selenium-java to 4.47.0.
  • Adapt Cookie imports and cookie construction to HtmlUnit 5's org.htmlunit.http.Cookie.
  • Keep the existing HtmlUnit MockMvc tests passing on the new API.

Tests:

  • JAVA_HOME=/opt/homebrew/opt/openjdk@25 ./gradlew build

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Aug 24, 2026
HtmlUnit 5 moved its Cookie type to org.htmlunit.http, so
Spring Test's HtmlUnit integration now uses the new API.

Constraint: Keep HtmlUnit and htmlunit3-driver versions compatible.
Rejected: Upgrade HtmlUnit alone | driver requires HtmlUnit 5.4.0.
Confidence: high
Scope-risk: narrow
Directive: Keep HtmlUnit and the driver version aligned.
Tested: JAVA_HOME=/opt/homebrew/opt/openjdk@25 ./gradlew build
Not-tested: None
Signed-off-by: jungh8n <jh981113@naver.com>
@bclozel bclozel self-assigned this Aug 28, 2026
@bclozel bclozel added in: test Issues in the test module type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Aug 28, 2026
@bclozel bclozel added this to the 7.1.0-M2 milestone Aug 28, 2026
@bclozel
bclozel force-pushed the fix/37075-htmlunit-5-upgrade branch from a9dff2b to 09548c0 Compare August 28, 2026 16:23
@bclozel
bclozel merged commit 09548c0 into spring-projects:main Aug 28, 2026
1 check passed
@bclozel bclozel removed this from the 7.1.0-M2 milestone Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: test Issues in the test module type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade to HtmlUnit 5

3 participants