Integration · Test management · via REST API

Fresh, masked test data for tests scheduled from qTest

When qTest Launch schedules an automated run, the Universal Agent on your Automation Host sets up the environment, runs the tests and sends results to qTest Manager. Add the Synthesized call to that agent, and every scheduled run starts on freshly masked or synthetic data.

qTest and Synthesized at a glance

There is no qTest connector; this pattern uses the documented REST API and the Universal Agent's documented fields.

Where the call goesThe Universal Agent's Execute Command (or its Pre-Execute Script), before the test command.
ExecutorsShell on Linux and Mac hosts, batch on Windows hosts; Node and Python are also available.
ResultsPath to Results and Result Parser send test results to qTest Manager as usual.
ConfigurationGOVERNOR_URL, WORKFLOW_ID and GOVERNOR_ACCESS_KEY as environment variables on the Automation Host.
StatusWorks through the REST API. qTest isn't named in the Synthesized docs; the API calls are.

Set it up

1. Build the workflow in Governor

Create the masking, subsetting or generation workflow that fills your test database, and run it once by hand.

2. Prepare the Automation Host

Install curl and jq, set the three environment variables, and make sure the host can reach Governor over HTTPS.

3. Configure the Universal Agent

Pull your test project in the Pre-Execute Script, and start the Execute Command with the Synthesized script, as below.

4. Debug once, then schedule

Execute the agent manually from qTest Launch to check the refresh and the test results, then schedule it as usual.

Example Universal Agent settings

For a Linux or Mac host with the shell executor. The test command is an example; keep your own.

Pre-Execute Script

#!/bin/bash
cd /usr/local/var/my-tests
git pull

Execute Command

cd /usr/local/var/my-tests
sh ./scripts/run-synthesized-workflow.sh && mvn -B test

scripts/run-synthesized-workflow.sh

#!/bin/sh
# run-synthesized-workflow.sh: start a Synthesized workflow and wait for it.
# Needs GOVERNOR_URL, WORKFLOW_ID and GOVERNOR_ACCESS_KEY; uses curl and jq.
set -eu
API="$GOVERNOR_URL/external/api/v1"
AUTH="X-Access-Key: $GOVERNOR_ACCESS_KEY"
TIMEOUT_SEC="${TIMEOUT_SEC:-1800}"
 
RUN=$(curl -sSf -X POST -H "$AUTH" "$API/workflow/$WORKFLOW_ID/run")
RUN_ID=$(printf '%s' "$RUN" | jq -r '.workflow_run_id')
echo "Started workflow run $RUN_ID"
 
WAITED=0
while [ "$WAITED" -lt "$TIMEOUT_SEC" ]; do
RUN=$(curl -sSf -H "$AUTH" "$API/workflow-run/$RUN_ID")
STATUS=$(printf '%s' "$RUN" | jq -r '.workflow_run_status')
case "$STATUS" in
COMPLETED) echo "Test data ready"; exit 0 ;;
FAILED|STOPPED)
echo "Run $RUN_ID ended as $STATUS: $(printf '%s' "$RUN" | jq -r '.error_message')"
curl -sS -H "$AUTH" "$API/workflow-run/$RUN_ID/logs" | tail -n 50
exit 1 ;;
esac
sleep 10
WAITED=$((WAITED + 10))
done
echo "Timed out after $TIMEOUT_SEC seconds; stopping workflow $WORKFLOW_ID"
curl -sS -X POST -H "$AUTH" "$API/workflow/$WORKFLOW_ID/stop" || true
exit 1

Things to know

Use a dedicated key

An access key carries the permissions of the Governor user who generated it. Create a user that can reach only the workflows this pipeline runs, generate the key as that user, and give it a short expiry: keys are chosen from 1 hour to a year, and the docs say they can't yet be revoked.

One output database per environment

Two runs can't write to the same output database at the same time. If parallel pipelines or branches need data, give each environment its own workflow or output database.

Where the data goes

Workers read the source, mask, subset or generate, and write the target. Database contents stay with the workers and aren't sent to Governor, which, like the pipeline, only sees run status, logs and configuration. Run Synthesized on-premises, including air-gapped, and the data never leaves your environment; it is also available as SaaS.

Questions about qTest and Synthesized

Is there a qTest connector?

No. The Universal Agent on your qTest Automation Host runs the REST API call before the tests, so it works wherever the host can reach Governor over HTTPS.

Where should the call go?

At the start of the Execute Command, joined to the test command with &&, so the tests run only if the refresh succeeded. The Pre-Execute Script works too; check in a debug run how your Automation Host version handles a failing pre-execute script.

What about Windows hosts?

Use the batch executor and call a PowerShell script with Invoke-RestMethod; the calls are the same.

Does qTest see the test data?

No. qTest Manager receives test results from the agent. The data stays in your test database, written by Synthesized workers.

We run Tosca tests from qTest. Which page applies?

Use the Tricentis Tosca integration for Tosca execution, and this pattern for other frameworks scheduled through qTest Launch.

Try it on one scheduled run

Bring one qTest-scheduled suite that waits on test data, and see Synthesized refresh it before the run.

Updated November 2026

Tricentis, Tosca and qTest are trademarks of Tricentis. All other product names are trademarks of their respective owners.