The Simplest Way to Make Cypress and Ubiquiti Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use cypress and ubiquiti together to test web apps across local network gear. Cypress runs browser checks while Ubiquiti routes traffic and enforces local network rules. This setup lets engineers check how apps behave across real switches and routers. Teams can test captive portals, local dashboards, and isolated network zones before shipping changes. How cypress and ubiquiti handle logins and traffic flow Cypress runs tests from a runner machine inside a build pipeline or local networ

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 cypress and ubiquiti together to test web apps across local network gear. Cypress runs browser checks while Ubiquiti routes traffic and enforces local network rules.

This setup lets engineers check how apps behave across real switches and routers. Teams can test captive portals, local dashboards, and isolated network zones before shipping changes.

How cypress and ubiquiti handle logins and traffic flow

Cypress runs tests from a runner machine inside a build pipeline or local network. Ubiquiti hardware manages the virtual networks, firewall rules, and routing paths between hosts.

When a test starts, Cypress opens a browser and sends requests to the target app. Those requests pass through Ubiquiti switches and routers to reach the right subnet.

Some teams also use Cypress to test Ubiquiti management consoles or guest portals directly. In this workflow, the test runner logs in with a dedicated local account.

The runner sends credentials, loads the portal page, and checks that network rules work. Permissions depend on both the user role and the source subnet of the runner.

Data flows back to the runner as web pages, status codes, and API payloads. Keeping the login scope small and network path clear prevents flaky test runs.

Common failure modes and how to scope network paths

Many teams start by sharing one full admin account across all test runners. If a build log leaks that password, anyone can change core router rules.

Shared accounts also make audit logs hard to read during an incident. You cannot tell which test run or engineer changed a setting on the controller.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Broad network rules cause another big risk for production and staging hardware. Putting test runners on the main management network exposes every switch to stray traffic.

Unlogged requests and cached sessions also break tests when tokens expire mid-run. When two runners share one login, one runner can log the other out.

To fix this, place your Cypress runners on a dedicated virtual network segment. Add strict firewall rules in Ubiquiti so runners only reach specific test targets.

Create a read-only role for tests that only check dashboard states or device health. Give write roles only to specific suites that test network changes in a lab.

Rotate test keys often and clear browser state before each test suite starts. Separate accounts per runner keep your audit logs clean and prevent session clashes.

Keeping test data safe in logs and reports

Browser tests often record screen snapshots, network payloads, and console logs when checks fail. If a test views user pages, those logs can capture real personal details.

Payloads might include emails, phone numbers, card numbers, or national IDs from test databases. Storing those raw values in build servers creates a serious data exposure risk.

Teams should use synthetic data in isolated lab networks whenever they run browser checks. Data masking can also rewrite matched fields in results before logs save to disk.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

How should we connect cloud Cypress runners to local Ubiquiti gear?

Place a runner inside a dedicated lab subnet managed by your Ubiquiti router. Allow only outbound results to your cloud dashboard and block broad inbound traffic.

Why do our Cypress tests fail with timeouts across Ubiquiti subnets?

Firewall rules between virtual networks often block the test runner from reaching the app. Check that your router permits traffic from the runner IP to the target port.

What role should a Cypress test account have on Ubiquiti consoles?

Give the test account a read-only viewer role for standard monitoring and health checks. Only use admin roles inside isolated lab gear that carries no live traffic.

The query runs. The emails stay hidden.