spring-projects / spring-projects/spring-security-samples

Consider Removing Selenium Dependency

Open
#297 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.8k
Forks
797
Avg merge
3m
Merged PRs (30d)
5

Description

It may be helpful to remove the Selenium dependency in the samples in favor of HtmlUnit.

Here is a dependency listing for HtmlUnit:

+--- org.htmlunit:htmlunit:4.3.0
|    +--- org.apache.httpcomponents:httpmime:4.5.14
|    |    \--- org.apache.httpcomponents:httpclient:4.5.14 (*)
|    +--- org.htmlunit:htmlunit-core-js:4.3.0
|    +--- org.htmlunit:neko-htmlunit:4.3.0
|    +--- org.htmlunit:htmlunit-cssparser:4.3.0
|    +--- org.htmlunit:htmlunit-xpath:4.3.0
|    +--- org.htmlunit:htmlunit-csp:4.3.0
|    +--- org.htmlunit:htmlunit-websocket-client:4.3.0
|    +--- org.apache.commons:commons-lang3:3.14.0
|    +--- org.apache.commons:commons-text:1.12.0
|    +--- commons-io:commons-io:2.16.1
|    +--- commons-logging:commons-logging:1.3.2
|    +--- commons-net:commons-net:3.11.1
|    +--- commons-codec:commons-codec:1.17.0
|    \--- org.brotli:dec:0.1.2

And here is one for Selenium:

+--- org.seleniumhq.selenium:htmlunit-driver:4.13.0
|    +--- org.seleniumhq.selenium:selenium-api:4.13.0 -> 4.22.0
|    +--- org.seleniumhq.selenium:selenium-support:4.13.0 -> 4.22.0
|    |    +--- com.google.auto.service:auto-service-annotations:1.1.1
|    |    +--- com.google.guava:guava:33.2.1-jre
|    |    |    +--- com.google.guava:failureaccess:1.0.2
|    |    |    +--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
|    |    |    +--- com.google.code.findbugs:jsr305:3.0.2
|    |    |    +--- org.checkerframework:checker-qual:3.42.0
|    |    |    \--- com.google.errorprone:error_prone_annotations:2.26.1
|    |    +--- net.bytebuddy:byte-buddy:1.14.17 -> 1.14.18
|    |    +--- org.seleniumhq.selenium:selenium-api:4.22.0
|    |    +--- org.seleniumhq.selenium:selenium-json:4.22.0
|    |    |    \--- org.seleniumhq.selenium:selenium-api:4.22.0
|    |    \--- org.seleniumhq.selenium:selenium-remote-driver:4.22.0
|    |         +--- com.google.auto.service:auto-service-annotations:1.1.1
|    |         +--- com.google.guava:guava:33.2.1-jre (*)
|    |         +--- io.opentelemetry.semconv:opentelemetry-semconv:1.25.0-alpha
|    |         +--- io.opentelemetry:opentelemetry-api:1.39.0
|    |         |    \--- io.opentelemetry:opentelemetry-context:1.39.0
|    |         +--- io.opentelemetry:opentelemetry-context:1.39.0
|    |         +--- io.opentelemetry:opentelemetry-exporter-logging:1.39.0
|    |         |    +--- io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.39.0
|    |         |    |    \--- io.opentelemetry:opentelemetry-sdk:1.39.0
|    |         |    |         +--- io.opentelemetry:opentelemetry-api:1.39.0 (*)
|    |         |    |         +--- io.opentelemetry:opentelemetry-sdk-common:1.39.0
|    |         |    |         |    \--- io.opentelemetry:opentelemetry-api:1.39.0 (*)
|    |         |    |         +--- io.opentelemetry:opentelemetry-sdk-trace:1.39.0
|    |         |    |         |    +--- io.opentelemetry:opentelemetry-api-incubator:1.39.0-alpha
|    |         |    |         |    |    \--- io.opentelemetry:opentelemetry-api:1.39.0 (*)
|    |         |    |         |    +--- io.opentelemetry:opentelemetry-api:1.39.0 (*)
|    |         |    |         |    \--- io.opentelemetry:opentelemetry-sdk-common:1.39.0 (*)
|    |         |    |         +--- io.opentelemetry:opentelemetry-sdk-metrics:1.39.0
|    |         |    |         |    +--- io.opentelemetry:opentelemetry-api-incubator:1.39.0-alpha (*)
|    |         |    |         |    +--- io.opentelemetry:opentelemetry-api:1.39.0 (*)
|    |         |    |         |    \--- io.opentelemetry:opentelemetry-sdk-common:1.39.0 (*)
|    |         |    |         \--- io.opentelemetry:opentelemetry-sdk-logs:1.39.0
|    |         |    |              +--- io.opentelemetry:opentelemetry-api-incubator:1.39.0-alpha (*)
|    |         |    |              +--- io.opentelemetry:opentelemetry-api:1.39.0 (*)
|    |         |    |              \--- io.opentelemetry:opentelemetry-sdk-common:1.39.0 (*)
|    |         |    \--- io.opentelemetry:opentelemetry-sdk:1.39.0 (*)
|    |         +--- io.opentelemetry:opentelemetry-sdk-common:1.39.0 (*)
|    |         +--- io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.39.0 (*)
|    |         +--- io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:1.39.0
|    |         |    +--- io.opentelemetry:opentelemetry-api-incubator:1.39.0-alpha (*)
|    |         |    +--- io.opentelemetry:opentelemetry-sdk:1.39.0 (*)
|    |         |    \--- io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:1.39.0 (*)
|    |         +--- io.opentelemetry:opentelemetry-sdk-trace:1.39.0 (*)
|    |         +--- io.opentelemetry:opentelemetry-sdk:1.39.0 (*)
|    |         +--- net.bytebuddy:byte-buddy:1.14.17 -> 1.14.18
|    |         +--- org.seleniumhq.selenium:selenium-api:4.22.0
|    |         +--- org.seleniumhq.selenium:selenium-http:4.22.0
|    |         |    +--- com.google.auto.service:auto-service-annotations:1.1.1
|    |         |    +--- dev.failsafe:failsafe:3.3.2
|    |         |    +--- org.seleniumhq.selenium:selenium-api:4.22.0
|    |         |    \--- org.seleniumhq.selenium:selenium-json:4.22.0 (*)
|    |         +--- org.seleniumhq.selenium:selenium-json:4.22.0 (*)
|    |         +--- org.seleniumhq.selenium:selenium-manager:4.22.0
|    |         |    +--- org.seleniumhq.selenium:selenium-api:4.22.0
|    |         |    +--- org.seleniumhq.selenium:selenium-json:4.22.0 (*)
|    |         |    \--- org.seleniumhq.selenium:selenium-os:4.22.0
|    |         |         +--- org.apache.commons:commons-exec:1.4.0
|    |         |         \--- org.seleniumhq.selenium:selenium-api:4.22.0
|    |         \--- org.seleniumhq.selenium:selenium-os:4.22.0 (*)
|    \--- net.sourceforge.htmlunit:htmlunit:2.70.0
|         +--- org.apache.httpcomponents:httpmime:4.5.14
|         |    \--- org.apache.httpcomponents:httpclient:4.5.14
|         |         +--- org.apache.httpcomponents:httpcore:4.4.16
|         |         \--- commons-logging:commons-logging:1.2
|         +--- net.sourceforge.htmlunit:htmlunit-core-js:2.70.0
|         +--- net.sourceforge.htmlunit:neko-htmlunit:2.70.0
|         +--- net.sourceforge.htmlunit:htmlunit-cssparser:1.14.0
|         +--- net.sourceforge.htmlunit:htmlunit-xpath:2.70.0
|         +--- org.apache.commons:commons-lang3:3.12.0 -> 3.14.0
|         +--- org.apache.commons:commons-text:1.10.0
|         +--- commons-io:commons-io:2.10.0
|         +--- commons-logging:commons-logging:1.2
|         +--- commons-net:commons-net:3.9.0
|         +--- commons-codec:commons-codec:1.15 -> 1.17.1
|         +--- org.brotli:dec:0.1.2
|         +--- com.shapesecurity:salvation2:3.0.1
|         \--- org.eclipse.jetty.websocket:websocket-client:9.4.50.v20221201
|              +--- org.eclipse.jetty:jetty-client:9.4.50.v20221201 -> 12.0.11
|              |    +--- org.eclipse.jetty:jetty-alpn-client:12.0.11
|              |    |    +--- org.eclipse.jetty:jetty-io:12.0.11
|              |    |    |    +--- org.eclipse.jetty:jetty-util:12.0.11
|              |    |    |    |    \--- org.slf4j:slf4j-api:2.0.12 -> 2.0.13
|              |    |    |    \--- org.slf4j:slf4j-api:2.0.12 -> 2.0.13
|              |    |    \--- org.slf4j:slf4j-api:2.0.12 -> 2.0.13
|              |    +--- org.eclipse.jetty:jetty-http:12.0.11
|              |    |    +--- org.eclipse.jetty:jetty-io:12.0.11 (*)
|              |    |    +--- org.eclipse.jetty:jetty-util:12.0.11 (*)
|              |    |    \--- org.slf4j:slf4j-api:2.0.12 -> 2.0.13
|              |    +--- org.eclipse.jetty:jetty-io:12.0.11 (*)
|              |    \--- org.slf4j:slf4j-api:2.0.12 -> 2.0.13
|              +--- org.eclipse.jetty:jetty-util:9.4.50.v20221201 -> 12.0.11 (*)
|              +--- org.eclipse.jetty:jetty-io:9.4.50.v20221201 -> 12.0.11 (*)
|              \--- org.eclipse.jetty.websocket:websocket-common:9.4.50.v20221201
|                   +--- org.eclipse.jetty.websocket:websocket-api:9.4.50.v20221201
|                   +--- org.eclipse.jetty:jetty-util:9.4.50.v20221201 -> 12.0.11 (*)
|                   \--- org.eclipse.jetty:jetty-io:9.4.50.v20221201 -> 12.0.11 (*)

Selenium is also dependent on an insecure version of HtmlUnit

It may be possible to only use HtmlUnit for the simple level of testing that Spring Security does.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Selenium dependency and its usage across the samples, then compare those uses with the HtmlUnit dependency information in the issue. Done means the samples no longer depend on Selenium, use HtmlUnit where appropriate, and their existing tests still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.