The Simplest Way to Make Buildkite and Selenium Work Like They Should
Using buildkite and selenium together lets teams run browser tests on every code change. Buildkite starts the test jobs, and Selenium runs the browsers to check your web app. This setup keeps your main code branch clean and catches UI bugs early. Your build agents stay inside your private network while controlling local or remote browser nodes. Teams get fast feedback on pull requests without running slow tests on developer laptops. How buildkite and selenium share permissions and data The w
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.
Using buildkite and selenium together lets teams run browser tests on every code change. Buildkite starts the test jobs, and Selenium runs the browsers to check your web app.
This setup keeps your main code branch clean and catches UI bugs early. Your build agents stay inside your private network while controlling local or remote browser nodes. Teams get fast feedback on pull requests without running slow tests on developer laptops.
How buildkite and selenium share permissions and data
The workflow starts when a developer pushes new code to your source control system. Buildkite sees this change and sends a job to an available build agent. That agent pulls the test code and prepares to talk to the Selenium hub. The agent needs a secure way to log in to the browser grid.
Most teams store grid keys in a secret store that the agent can read. During the job run, the agent fetches the key and starts the test script. The script sends browser commands over the network to the Selenium hub. The hub routes those commands to a browser node that matches your test needs.
Next, the browser node opens the target web app to click buttons and read text. As the test runs, the node sends status updates and screenshots back to the agent. The agent collects these results and uploads test logs to the Buildkite dashboard. Once the job finishes, the browser node closes the session and wipes its local data.
Common traps with shared accounts and network paths
Many teams hit trouble when they use one shared key for every build agent. If that single key leaks in a build log, anyone can control your test grid. Broad keys also make it hard to see which pipeline broke the test setup. You should give each pipeline its own narrow role and rotate keys often.
Network paths between the agent, the browser node, and the staging app also cause failures. Browser nodes must reach the staging app, not just the build agent. If the node sits in a different network zone, tests will time out right away. Teams often open wide firewall rules to fix this, which exposes internal apps to risk.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged test actions and leftover test data create another big blind spot for teams. Browser tests often log in to staging databases using real test accounts and sensitive data. If tests fail halfway through, they might leave dirty records or open sessions behind. When real user data enters staging, masking rewrites emails and phone numbers in results.
How to scope roles and keep browser nodes clean
To keep your pipeline fast and safe, run browser nodes as single-use containers. Start a fresh browser container for each build job and destroy it right after. This simple rule stops failed tests from breaking the next run with stale cookies. It also stops one team's job from reading files left by another team.
Lock down network rules so browser nodes only talk to your staging web app. Block those nodes from reaching production servers or internal admin tools. Give each build agent a unique role so your logs show who ran each test. Check your pipeline logs every week to spot slow browser steps and failed logins.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Where should we run the Selenium grid when using Buildkite?
Run the grid inside the same private network as your Buildkite agents and staging app. This setup cuts down network lag and avoids exposing your staging site to the internet.
How do we stop parallel Buildkite jobs from fighting over browser nodes?
Set a cap on your pipeline steps or scale your browser nodes with containers. Starting fresh browser containers per job keeps parallel runs from blocking each other.
How should build agents handle test user passwords for web logins?
Keep test user passwords in a dedicated secret store and fetch them during the run. Never hardcode login keys in your test scripts or print them in build logs.
Related guides
In this post