API: Runs
Runs: Run a test, Run a project, List runs, Get a run, Wait for a run, Stop a run, Download a run file.
Run a test
Start a run of one test. Runs take minutes: poll get_run until final is true. watchUrl opens the run live without signing in. App tests run the newest build of their app unless buildId names another (see list_builds). watchUrl is a view-only link anyone can open (no sign-in) to watch the run live and read its result for a while after it ends; give it to the person waiting for the result. Absent when the workspace turned watch links off. REST: send an Idempotency-Key header so a retried request does not start a second run.
| Path |
|---|
testIdstringrequired |
| Body (JSON) |
|---|
modeauto | cold | warm |
buildIdstring |
devicephone | tablet |
osVersionstring |
orientationdefault | portrait | landscape |
urlstring |
Returns 201 { runId, mode, overage, link, watchUrl }
curl -X POST https://app.testsy.dev/api/v1/tests/t_mvg0/run \
-H "Authorization: Bearer $TESTSY_AI_API_KEY" \
-H "Idempotency-Key: deploy-4812"Run a project
Start a run of every test in a project (a suite). Each started run has a watchUrl to watch it live without signing in. buildIds: builds to use; each app test runs the one of its own app. Tests that could not start are listed in skipped with the reason. REST: send an Idempotency-Key header to make a retry safe.
| Path |
|---|
projectIdstringrequired |
| Body (JSON) |
|---|
modeauto | cold | warm |
buildIdsstring[] |
buildIdstring |
devicephone | tablet |
osVersionstring |
orientationdefault | portrait | landscape |
urlstring |
Returns 201 { started: [{ testId, runId, mode, buildId, link, watchUrl }], skipped: [{ testId, reason }], upgradeUrl? (when the plan stopped a run) }. Nothing started: 402 not_started (or 400 empty) with the same lists
curl -X POST https://app.testsy.dev/api/v1/projects/p_8f2k/run \
-H "Authorization: Bearer $TESTSY_AI_API_KEY" \
-H "Idempotency-Key: deploy-4812"List runs
Recent runs, newest first, optionally for one test or project or with one status; or the runs with the given ids.
| Query |
|---|
idsstring |
testIdstring |
projectIdstring |
statusqueued | running | passed | failed | blocked | inconclusive | error | cancelled |
limitnumber |
Returns { runs: [{ id, testId, testTitle, status, mode, source, platform, createdAt, finishedAt, durationMs, … }] }; with ids, each run as in Get a run
curl https://app.testsy.dev/api/v1/runs?ids=… \
-H "Authorization: Bearer $TESTSY_AI_API_KEY"Get a run
A run: its status, and once final the verdict, the headline, each check's result with the reason, the values read, and links to the video, screenshots and the result page.
| Path |
|---|
runIdstringrequired |
Returns { run: { id, testId, testTitle, url, mode, status, final, createdAt, startedAt, finishedAt, durationMs, error, device, verdict, headline, requirements, captures, video, screenshots, build, link } }
curl https://app.testsy.dev/api/v1/runs/j_mvg1 \
-H "Authorization: Bearer $TESTSY_AI_API_KEY"Wait for a run
Wait up to seconds (default 25, at most 55) for a run to finish, then return it: one call instead of polling get_run every few seconds. Call it again while final is false. The answer comes back the moment the run is final (verdict, checks and evidence in), or when the time is up with final false — then call wait_run again. Runs take 2 to 20 minutes, so expect several calls for a long run; each costs nothing while it waits.
| Path |
|---|
runIdstringrequired |
| Query |
|---|
secondsnumber |
Returns { run (as in Get a run), final, waitedMs }: the run once it is final, or as it stands when the wait is over
curl https://app.testsy.dev/api/v1/runs/j_mvg1/wait?seconds=… \
-H "Authorization: Bearer $TESTSY_AI_API_KEY"Stop a run
Stop a queued or running run. A run you stop is not counted.
| Path |
|---|
runIdstringrequired |
Returns { status }
curl -X POST https://app.testsy.dev/api/v1/runs/j_mvg1/stop \
-H "Authorization: Bearer $TESTSY_AI_API_KEY"Download a run file
Download a run's video or screenshot (the links in get_run). Supports Range requests.
| Path |
|---|
runIdstringrequired |
filestringrequired |
Returns The file (video/mp4, image/png, …); 206 for a Range request
curl https://app.testsy.dev/api/v1/runs/j_mvg1/files/review.mp4 \
-H "Authorization: Bearer $TESTSY_AI_API_KEY"