The Simplest Way to Make Pulsar and Selenium Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use pulsar and selenium to run browser tests from message queues. A message enters the queue, and a worker starts a browser test. This setup keeps heavy browser tasks away from your main web app. Test runs happen in order, and results go back to another topic. Without good rules, test workers can leak keys or write bad data. Your team needs clear roles, safe keys, and good logs for every run. How data and roles flow between pulsar and selenium Your app sends a test job message to a sp

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 use pulsar and selenium to run browser tests from message queues. A message enters the queue, and a worker starts a browser test.

This setup keeps heavy browser tasks away from your main web app. Test runs happen in order, and results go back to another topic.

Without good rules, test workers can leak keys or write bad data. Your team needs clear roles, safe keys, and good logs for every run.

How data and roles flow between pulsar and selenium

Your app sends a test job message to a specific topic. A worker reads that message and starts a new browser session.

The worker needs a key to read from the message topic. It also needs a separate role to write the final test results.

The browser grid checks the worker before starting any new browser window. Each browser run opens a target web app and runs the steps.

When the test ends, the worker sends pass or fail logs back. Another service reads those logs and alerts the team about broken pages.

Good setups keep read and write roles split across different worker types. A worker that runs tests should not delete topics or change rules.

You should also mask private fields in test payloads and log outputs. Data masking rewrites emails, phone numbers, card numbers, and national IDs in results.

Common failure modes and how to scope network paths

Many teams share one broad key across all their test workers. If one test container breaks, an attacker gets full topic control.

Long-lived keys in test scripts also create big risks for your team. People copy those keys into local files and forget to rotate them.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged test runs cause another major problem during incidents and audits. When a browser test changes data, you must know who triggered it.

Start fixing this by giving each worker group its own narrow role. Allow read rights only on the exact topic that holds test jobs.

Next, lock down the network paths between the queue and browser nodes. Browser nodes only need network routes to the test target apps.

They never need direct network routes to your message topics or databases. Only the worker process should talk to both the topic and browser.

Managing test state and worker timeouts in production

Browser tests take much longer to finish than normal queue tasks. If a page hangs, the worker might hold the message too long.

Then the queue thinks the worker died and sends the message again. Now two browsers run the exact same test at the same time.

This double run can corrupt test accounts and ruin your test results. Set strict time limits on every browser step to prevent hung workers.

Keep your messages small by storing only test IDs and target URLs. Do not put large screenshots or video files inside the queue message.

Save large test files to object storage and send the file path. This keeps topic traffic fast and prevents memory crashes on your workers.

Always tag each message with a unique run ID for easy tracking. Your team can trace a failed click right back to the message.

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

Why put a message queue in front of browser tests?

Browser tests use a lot of memory and CPU on your servers. A queue holds the test jobs so workers run them at a steady pace.

How do we stop browser workers from reading the wrong topics?

Give each worker group a separate role with strict topic permissions. Only allow a worker to read from its assigned test job topic.

What data should go inside the test message payload?

Send only a run ID, the target URL, and basic test names. Never put raw passwords, card numbers, or large files in the message.

The query runs. The emails stay hidden.