The Simplest Way to Make Jenkins and Testcomplete Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams use jenkins and testcomplete to run automated UI tests after every code change. Jenkins triggers the build pipeline, and TestComplete runs desktop or web tests on remote agents. This pairing lets engineering teams catch visual bugs before code reaches production. When a developer pushes code, the build server starts a test job right away. The test runner then opens the app, clicks through user flows, and sends results back. How jenkins and testcomplete share tasks and data The workflow

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 jenkins and testcomplete to run automated UI tests after every code change. Jenkins triggers the build pipeline, and TestComplete runs desktop or web tests on remote agents.

This pairing lets engineering teams catch visual bugs before code reaches production. When a developer pushes code, the build server starts a test job right away. The test runner then opens the app, clicks through user flows, and sends results back.

How jenkins and testcomplete share tasks and data

The workflow between jenkins and testcomplete relies on a coordinator and agent setup. The main build server holds the pipeline rules and schedules each job. A remote Windows machine acts as the agent and runs the test tool.

First, the build server connects to the remote agent over the network. The agent pulls the latest code and test project files from version control. Next, the build step calls the test runner on that machine.

UI tests need a live screen to click buttons and read text. Because of this, the agent must open an active Windows user session. Running the agent as a background service without a screen will fail.

Once the session opens, the test tool launches the target app. It runs the test suite and records screenshots and step logs. When the run finishes, the agent sends a pass or fail status back. The build server reads the report files and shows them on the job dashboard.

Common failure modes and how to scope permissions

Many teams hit errors because of how they set up agent logins. The most common mistake is using a single shared admin account for all agents. If five jobs use the same login at once, sessions clash and tests break.

Another failure happens when someone locks or closes the remote desktop window. When the window closes, Windows stops drawing the screen. The test tool then fails because it cannot see the buttons to click.

Broad network access and static keys also create big security risks. Test agents often need database access to set up test data or check results. Teams sometimes store broad database passwords right inside test scripts or build files. Anyone who can read the build logs might see those secrets.

Jenkins Pipeline Security + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

To fix session clashes, give each test agent its own local user account. Set the agent machine to keep the desktop session unlocked inside a secure network. Never connect to an active test machine with a manual remote desktop session.

Scope permissions down to the bare minimum for every build role. The build server should only have rights to start jobs on the test subnet. It should not have full admin rights across your whole network.

Keep test data safe by removing production data from test databases. If test scripts query data, use data masking to rewrite sensitive fields in results. Masking can rewrite emails, phone numbers, card numbers, and national IDs during queries. You should also log every database query that a test agent runs.

How to keep test pipelines fast and stable

Long UI test suites can slow down your whole build pipeline. If a suite takes two hours, developers will stop waiting for the results. Break your tests into small groups to keep feedback fast.

Run a short smoke test on every code push. Save the full test suite for nightly runs or release branches. You can also run test groups across several agent machines at the same time.

Clean up the test machine before and after every single run. Close hung browser windows, reset local files, and clear temp folders. A clean state stops one failed test from breaking the next ten tests.

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

Why do UI tests fail when the remote desktop window closes?

Closing the remote window locks the Windows session and stops rendering the screen. The test tool needs an active, unlocked screen to find and click UI elements.

Should the Jenkins agent run as a Windows service for UI testing?

No, a standard Windows service runs in the background without a desktop screen. Run the agent inside an active user session so the test tool can interact with the UI.

How can teams protect database secrets during automated test runs?

Never hardcode database passwords inside test project files or source code. Use scoped, short-lived credentials and audit every database query the test agent makes.

The query runs. The emails stay hidden.