The Simplest Way to Make Looker and Selenium Work Like They Should
Teams use looker and selenium together to test data dashboards in a real browser. Selenium opens Looker pages, checks charts, and confirms that reports load without errors. Data teams build complex charts that change when underlying tables update. Manual checks take too much time after every code push. Browser scripts run these visual checks on a set schedule. They catch broken filters, blank tiles, and slow queries before business users notice. How logins, roles, and data flow between looker
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 looker and selenium together to test data dashboards in a real browser. Selenium opens Looker pages, checks charts, and confirms that reports load without errors.
Data teams build complex charts that change when underlying tables update. Manual checks take too much time after every code push. Browser scripts run these visual checks on a set schedule. They catch broken filters, blank tiles, and slow queries before business users notice.
How logins, roles, and data flow between looker and selenium
The workflow starts when a test runner launches a headless browser session. Selenium drives the browser and navigates to the analytics login page. The script enters credentials or passes a valid session token to log in. Once inside, the browser requests a specific dashboard URL.
Looker checks the user role tied to that active browser session. It reads the model rules and builds SQL queries for the underlying database. The database runs those queries and sends the result rows back to the app. Looker renders the visual charts in the browser DOM.
Selenium waits for the chart elements to finish drawing on the screen. It reads the page text, checks for error banners, and takes screenshots. If a chart fails to load, the script marks the build as failed. It then sends an alert to the engineering team and closes the browser.
Common failure modes and how to scope roles and network paths
Many teams make the mistake of using a shared admin account for tests. An admin role sees every dashboard and every database table. If a test log leaks that key, an attacker gains full access. Shared accounts also make audit logs hard to read during an incident.
You cannot tell which test run triggered a slow or expensive database query. Broad tokens also stay valid for months without rotation. If a script pulls real customer tables, sensitive fields appear in test screenshots. Emails, phone numbers, and card numbers can end up in build storage.
End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, create a dedicated test role with narrow read permissions. Scope the role so it only sees the exact dashboards under test. Point the test models at synthetic data or masked views when possible. Masking rewrites matched fields like national IDs in results before charts render.
Lock down the network path between your test runners and the analytics host. Run the browser nodes inside a private subnet with strict outbound rules. Allow traffic only to the analytics server and block all other web hosts. Rotate the test user credentials on a short schedule to limit exposure.
Managing database load and audit logs during browser tests
Browser tests trigger real database queries every time a dashboard loads. If twenty scripts open heavy reports at once, database queues will spike. That extra load can slow down reports for real business users. Teams should schedule full visual test suites during quiet hours.
Tag the test user role so database admins can spot test queries fast. Set query timeouts on the test role to kill runaway jobs early. Keep clear logs of every browser login and every page view. Good logs help engineers match a failed test to a specific database error.
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 use browser tests instead of the Looker API?
The API checks data values, while browser scripts check the actual visual layout. Selenium catches broken CSS, missing chart legends, and frozen filter menus on the page.
How do we handle multi-factor login prompts in automated browser runs?
Teams assign a dedicated service account that uses token login or scoped network rules. This approach avoids interactive phone prompts while keeping the test account locked to runner IPs.
How can we stop test screenshots from storing sensitive customer data?
Bind the test role to masked database views or synthetic test tables. Masking rewrites emails, phone numbers, and card numbers in results before the browser draws them.
Related guides
In this post