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

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair Minio and Selenium to run automated browser tests and store test files. Selenium drives the web browser while Minio saves screenshots, videos, and trace logs. This workflow keeps test results out of short-lived runner nodes. When a test fails, engineers check the saved files in object storage to find the bug. Without a clean setup, test nodes fill up their disks or lose important failure logs. How data and keys flow between Minio and Selenium In a standard test grid, a central hub

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 Minio and Selenium to run automated browser tests and store test files. Selenium drives the web browser while Minio saves screenshots, videos, and trace logs.

This workflow keeps test results out of short-lived runner nodes. When a test fails, engineers check the saved files in object storage to find the bug. Without a clean setup, test nodes fill up their disks or lose important failure logs.

How data and keys flow between Minio and Selenium

In a standard test grid, a central hub sends tasks to browser nodes. Each browser node opens the web app, runs checks, and records the screen. When the test ends, the node or test runner sends those files to a storage bucket.

To do this, the test runner must log in to the storage server. Most teams use an S3-compatible client library inside their test code or grid nodes. The runner reads an access key and a secret key from its local system. It uses those keys to sign upload requests and write files to a bucket.

Data also flows the other way during complex tests. A browser test might need a sample file to test an upload form. The test runner reads that sample file from a shared bucket before the browser step runs. Once the browser finishes the upload check, the runner writes the final test report back to storage.

Common failure modes and how to scope roles

The biggest risk in this setup is a shared root key. Many teams put the main storage admin key into every test runner to save time. If a test node gets compromised, an attacker can read or delete every bucket on the server. Shared keys also make it impossible to see which test job wrote or deleted a file.

Broad network paths create another major risk. Browser nodes often fetch external web pages and run untrusted scripts. If those nodes have open network paths to your whole storage cluster, one bad script can cause damage.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You can fix this by scoping roles down to the exact task. Create a separate role for your test runners that only allows writing to one artifacts bucket. Set up a second read-only role for fetching sample test inputs from a dedicated seed bucket. Never let test nodes list all buckets or delete older test runs.

Use bucket lifecycle rules to delete old videos and logs after a set number of days. This keeps storage costs low without giving delete permissions to the test runners. You should also turn on audit logs on your storage server. Audit logs show every read and write event with the key and source IP address.

Protecting test data and storage buckets in CI pipelines

Browser tests often run against staging apps that hold real or sensitive user records. When a test fails, the screenshot or page dump can capture emails, phone numbers, or card numbers. Those files then sit in an object bucket where many developers can read them.

Lock down who can read the failure bucket from their local laptop. Give developers read permissions only to the folders that match their own team or project. Keep your test grid and your storage nodes on a private network subnet. Allow traffic only on the exact port that the object storage API uses.

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

Should browser nodes upload files directly to the bucket?

It depends on what files you collect. Test runners can upload screenshots directly, while grid video recorders usually upload clips from the node itself.

How do we stop test artifacts from filling up our storage disks?

Set up an expiration rule on your test bucket. This rule removes old screenshots and videos after seven or thirty days without manual scripts.

Can we use temporary keys for CI test runs?

Yes, your CI runner can request a short-lived token before the test suite starts. That token expires right after the job finishes uploading its final report.

The query runs. The emails stay hidden.