The Simplest Way to Make Google Pub/Sub and Testcomplete Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Pairing google pub/sub and testcomplete lets teams run automated UI tests when cloud events happen. A message enters a topic, triggers a test runner, and sends results back. This setup connects backend queue events with front-end and API test suites. Teams do not need to wait for slow nightly schedules anymore. When a build finishes or data changes, the queue starts the right test right away. You catch bugs faster and keep your main branch clean. How data flows between google pub/sub and test

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.

Pairing google pub/sub and testcomplete lets teams run automated UI tests when cloud events happen. A message enters a topic, triggers a test runner, and sends results back.

This setup connects backend queue events with front-end and API test suites. Teams do not need to wait for slow nightly schedules anymore. When a build finishes or data changes, the queue starts the right test right away. You catch bugs faster and keep your main branch clean.

How data flows between google pub/sub and testcomplete

The workflow starts when a cloud service publishes an event message to a topic. This message holds basic metadata like the build tag or target test stage. A listener script or pipeline agent reads the message from a subscription. Once the agent gets the message, it calls the test runner on a host machine.

To make this work, both tools need clear identity rules and permissions. Your pipeline agent uses a cloud service account to pull messages from the subscription. The test host needs a local user session to open browsers or desktop apps. When the test run ends, the runner sends a summary back to another topic.

Downstream tools can read that result topic to alert the team in chat. They can also update a dashboard or block a bad release from moving forward. Keeping messages small and clear helps the whole loop run fast every time.

Common failure modes and how to scope roles

Many teams start by sharing one broad service account key across all test machines. If that static key leaks in a test log, attackers can read production queues. Broad permissions also let a broken test script delete topics or flood other systems. Shared local logins on test hosts make it hard to see who changed a script.

You can fix this by giving each test runner a tiny, single-purpose role. The subscription reader role should only pull from one specific test topic. The result writer role should only publish to the test summary topic. Never give editor or admin rights to a test runner account.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Network paths between your cloud project and your test hosts also need tight rules. Test machines often sit in a private subnet to reach internal staging apps. Use outbound pulls or restricted endpoints so you do not open wide inbound firewall ports. Rotate keys often and keep secret values out of plain text test files.

Keeping test payloads and logs clean

Event messages and test logs often carry sample user records for form checks. If real emails, phone numbers, or card numbers enter test topics, you create risk. Those details end up sitting in test reports and shared build logs for months.

Use fake data in your event payloads whenever you trigger a test run. If staging data comes from real sources, set up data masking rules first. Masking rewrites matched fields like national IDs or emails in results before scripts read them. You should also log every subscription pull and test run start with a timestamp.

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 does a queue message start a desktop or web test run?

A small worker script or CI agent watches the subscription for new messages. When a message arrives, the worker starts the test runner and passes the message data.

What cloud role does the test runner need?

Give the runner one role that can only pull from the trigger subscription. Add a second narrow role if it needs to write results to an output topic.

How do we handle failed test runs in the message queue?

Only send the message acknowledgment after the test runner starts up without errors. Set up a dead-letter topic to catch messages when a test host is offline.

The query runs. The emails stay hidden.