Skip to content
RecipesDoc

Selenium (Java) in Jenkins, App Behind a VPN

Certyn runs your Maven Selenium suite from a runner inside your network and reports why tests failed.

For teams with Selenium tests in Java and Maven, run by Jenkins, against an app reachable only inside the company network.

Your setup

  • Selenium WebDriver tests in Java, built with Maven.
  • Jenkins runs them today. It stays as it is.
  • The app is only on your VPN or internal network.
  • A Linux host with Docker that can reach the app. The runner needs only outbound HTTPS.

Say this to Certyn

Our Selenium Java tests (Maven) run in Jenkins. The app is only on our VPN at https://staging.acme.internal. Run them and tell me why they fail.

What Certyn does

  1. Opens the runner form. It shows one docker run command. Before you run it on your host, add this line so tools and caches stay between runs:

      -e WORKSPACE_PATH=/srv/certyn-workspace \
    

    The form waits until the runner is online, then sends the default environment's runs to it.

  2. Opens a form for repo access: GH_TOKEN for GitHub, or your host's token (for example BITBUCKET_TOKEN) as a secret project variable.

  3. Starts a Machine on the runner, checks the app URL from inside your network, and installs a JDK and Maven into /workspace once. Maven's local repository is /workspace/.m2 without extra setup, so dependencies download once.

  4. Reads your Jenkinsfile or pom.xml for the test command, passes the environment URL to the property your tests read, and runs one test class.

  5. Runs the whole suite as a run, or on a schedule as an agent process.

What you get

  • A run report from the Surefire results, with failures grouped by cause.
  • One issue per real product bug, with evidence.
  • Jenkins unchanged. To keep Jenkins history in Certyn too, push its Surefire XML to POST /api/ci/results as JUnit.

Limits

  • The runner form routes only the project's default environment. For another environment, set Execution target to Self-hosted runner in Environments.
  • Without WORKSPACE_PATH, the JDK and all dependencies install again at every run.
  • All runs on this runner share the workspace folder. Give each runner pool its own folder, and use it only for your team.
  • Jenkins cannot start this goal through the CI Runs API (suites only). To run after a deploy, set the environment version, as in the Cypress recipe.