The Simplest Way to Make JetBrains Space and Selenium Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair JetBrains Space and Selenium to run automated browser tests on every code push. This setup checks web apps for bugs before code reaches production. JetBrains Space stores your code, tracks tasks, and runs build jobs in containers. Selenium drives real web browsers to click buttons, fill forms, and check page text. When you link them, every merge request can trigger a full suite of UI checks. Developers get fast feedback right inside their code review view. How JetBrains Space and S

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams pair JetBrains Space and Selenium to run automated browser tests on every code push. This setup checks web apps for bugs before code reaches production.

JetBrains Space stores your code, tracks tasks, and runs build jobs in containers. Selenium drives real web browsers to click buttons, fill forms, and check page text. When you link them, every merge request can trigger a full suite of UI checks. Developers get fast feedback right inside their code review view.

How JetBrains Space and Selenium share keys and data

A Space job starts a worker container whenever a developer pushes new code. That worker pulls the project code and starts the test script. The script needs a browser to run the checks. You can run the browser inside the same job or use an external Selenium grid.

To talk to a remote grid or staging app, the job needs secret keys. Space stores these keys in its project secret store. When the job starts, Space passes those keys into the worker as variables. The test runner reads the variables and logs in to the staging app.

During the run, Selenium sends commands to the browser over the network. The browser loads the test app, runs each step, and sends back status codes. It also captures screenshots and page logs when a test fails. When the run finishes, the Space worker saves those files as build artifacts. The team can open Space to read the test report and inspect failed steps.

Common failure modes and how to scope roles

Many teams start by sharing one broad admin key across all test jobs. This shortcut creates big security risks. If a test script prints variables to the build log, anyone reading logs sees the key. A leaked admin key gives attackers full control over your staging or production systems.

Broad network rules cause another common problem. Teams often open their staging apps and Selenium grids to the whole internet. They do this so cloud workers can reach them without extra setup. Open grids let outsiders run their own browser jobs on your servers. Open staging apps expose test data to the public web.

Unlogged test runs also slow down bug fixes. When ten jobs use the same shared test account, app logs look the same. You cannot tell which build broke the database state or locked a user profile. Tests start failing at random because two jobs change the same test record at once.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You can fix these issues by scoping roles and network paths. First, create a dedicated service role for each project or test suite. Give that role only the exact permissions needed to run its specific checks. Never use human admin accounts for automated browser runs.

Second, isolate test data so parallel jobs do not clash. Have each Space job create its own test user or database slice before running Selenium. Clean up those records right after the browser closes.

Third, lock down network paths between your Space workers and your test targets. Run self-hosted Space workers inside the same private network as your Selenium grid. Restrict the grid firewall so only those worker IP addresses can send browser commands. If your tests touch staging databases, mask sensitive fields like emails, phone numbers, or card numbers. Masking rewrites matched fields in results so test logs stay safe.

Keeping browser tests fast and stable

Browser tests take more time and memory than unit tests. If you run every Selenium test on every commit, builds will queue up. Split your tests into two groups to keep feedback fast. Run a small group of login and checkout checks on every merge request. Schedule the full browser suite to run at night or before a release.

Keep your browser images and driver versions matched inside your Space job rules. Version mismatches cause crashes before the first page even loads. Pin exact container tags in your build file so updates happen on your schedule.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Should I run browsers inside the Space worker or on a separate grid?

Use the Space worker for small suites that need one browser type. Use a separate Selenium grid when you need parallel runs across many browser versions.

How do I stop flaky Selenium tests from blocking code merges in Space?

Wait for page elements to load instead of using fixed sleep timers. Also give each Space job isolated test data so parallel runs never clash.

Where should I store login passwords for my staging app?

Save all passwords and API keys in the Space project secret store. Pass them into your test runner at runtime and never write them in code files.

The query runs. The emails stay hidden.