Testnova REST API
Integrate AI-powered test generation, execution, and self-healing into your CI/CD pipeline. All the power of the Testnova dashboard — available programmatically.
The Testnova API lets you automate your entire QA workflow — from requirement to report — without touching the dashboard.
All API requests require a Testnova API key. Generate one from your dashboard under Settings → API Keys.
Bearer token
Pass your API key in the Authorization header on every request:
curl https://my.testnova.app/api/testnova/projects \
-H "Authorization: Bearer tn_live_YOUR_API_KEY" \
-H "Content-Type: application/json"
Key format
Live keys start with tn_live_. Test keys start with tn_test_. Keys are scoped to your workspace — all requests operate on data within your organisation.
The API uses standard HTTP status codes and returns JSON error bodies.
{
"error": "Project not found",
"detail": "No project with slug 'my-app' in your workspace"
}
Projects are the top-level container for test cases, scripts, runs, and integrations. Every other resource belongs to a project.
GET /api/testnova/projects List all projects in your workspace
curl https://my.testnova.app/api/testnova/projects \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
{
"projects": [{
"id": "proj_01...",
"slug": "my-web-app",
"name": "My Web App",
"status": "active",
"platform": "web",
"appUrl": "https://my-app.com"
}]
}
GET /api/testnova/projects/{slug} Get a single project by slug
| Parameter | Type | Description |
|---|---|---|
| slugrequired | string | The project slug (from the projects list) |
curl https://my.testnova.app/api/testnova/projects/my-web-app \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
Test cases are structured descriptions of what to test — the what, not the how. Testnova generates them from plain-English requirements, then converts them into executable scripts.
GET /api/testnova/test-cases List test cases across all projects
| Parameter | Type | Description |
|---|---|---|
| projectSlugoptional | string | Filter by project slug |
| limitoptional | number | Max results to return (default 50, max 200) |
curl "https://my.testnova.app/api/testnova/test-cases?projectSlug=my-web-app" \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
POST /api/testnova/generate-test-cases Generate AI test cases from a requirement
| Field | Type | Description |
|---|---|---|
| projectSlugrequired | string | The project to generate cases for |
| requirementrequired | string | Plain-English feature description (max 4000 chars) |
| countoptional | number | Number of cases to generate (default 10, max 50) |
curl -X POST https://my.testnova.app/api/testnova/generate-test-cases \
-H "Authorization: Bearer tn_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"projectSlug": "my-web-app",
"requirement": "User can log in with email and password",
"count": 10
}'
{
"cases": [{
"id": "tc_01...",
"title": "Valid login with correct credentials",
"priority": "critical",
"steps": [...]
}],
"generated": 10
}
Scripts are runnable Playwright (web), Appium (mobile), or raw HTTP (API) test files generated from test cases. Run them individually or as a full suite.
GET /api/testnova/test-scripts List test scripts across all projects
| Parameter | Type | Description |
|---|---|---|
| projectSlugoptional | string | Filter by project slug |
| platformoptional | string | web | mobile | api |
| statusoptional | string | passing | failing | pending |
curl "https://my.testnova.app/api/testnova/test-scripts?projectSlug=my-web-app&platform=web" \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
POST /api/testnova/generate-test-scripts Generate scripts from existing test cases
| Field | Type | Description |
|---|---|---|
| projectSlugrequired | string | Target project |
| caseIdsoptional | string[] | Specific case IDs to generate scripts for (default: all pending) |
| platformoptional | string | web | mobile | api (default: project default) |
curl -X POST https://my.testnova.app/api/testnova/generate-test-scripts \
-H "Authorization: Bearer tn_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "projectSlug": "my-web-app", "platform": "web" }'
POST /api/testnova/test-scripts/{id}/run Execute a single test script
| Parameter | Type | Description |
|---|---|---|
| idrequired | string | Script ID from the list endpoint |
curl -X POST https://my.testnova.app/api/testnova/test-scripts/scr_01.../run \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
POST /api/testnova/test-scripts/{id}/regenerate Regenerate a script using the latest DOM snapshot
curl -X POST https://my.testnova.app/api/testnova/test-scripts/scr_01.../regenerate \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
A run is a full execution of all (or selected) scripts in a project. Runs are executed in the cloud against your live app.
GET /api/testnova/runs List recent runs across all projects
| Parameter | Type | Description |
|---|---|---|
| projectSlugoptional | string | Filter by project |
| statusoptional | string | queued | running | passed | failed |
| limitoptional | number | Max results (default 20, max 100) |
curl "https://my.testnova.app/api/testnova/runs?projectSlug=my-web-app&status=failed" \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
{
"runs": [{
"id": "run_01...",
"status": "passed",
"passed": 24,
"failed": 2,
"durationMs": 47200,
"createdAt": "2026-06-06T09:12:00Z"
}]
}
GET /api/testnova/projects/{slug}/runs/{runId} Get a run with full result breakdown
curl https://my.testnova.app/api/testnova/projects/my-web-app/runs/run_01... \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
Download PDF reports, trigger report emails, and query the bug log surfaced from failing runs.
GET /api/testnova/projects/{slug}/runs/{runId}/pdf Download the run report as a PDF
curl https://my.testnova.app/api/testnova/projects/my-web-app/runs/run_01.../pdf \
-H "Authorization: Bearer tn_live_YOUR_API_KEY" \
--output report.pdf
Returns a application/pdf stream — pipe directly to a file or S3.
POST /api/testnova/projects/{slug}/report-email Send the run report by email to project recipients
| Field | Type | Description |
|---|---|---|
| runIdrequired | string | Run ID to send the report for |
curl -X POST https://my.testnova.app/api/testnova/projects/my-web-app/report-email \
-H "Authorization: Bearer tn_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "runId": "run_01..." }'
GET /api/testnova/bugs List bugs surfaced from failing runs
| Parameter | Type | Description |
|---|---|---|
| projectSlugoptional | string | Filter by project |
| statusoptional | string | open | resolved | ignored |
curl "https://my.testnova.app/api/testnova/bugs?projectSlug=my-web-app&status=open" \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
Trigger AI-powered self-healing for a project. Testnova re-snapshots the live app, detects selector drift, and regenerates failing scripts automatically.
POST /api/testnova/projects/{slug}/self-heal Re-snapshot & regenerate failing scripts
curl -X POST https://my.testnova.app/api/testnova/projects/my-web-app/self-heal \
-H "Authorization: Bearer tn_live_YOUR_API_KEY"
{
"ok": true,
"healed": 3,
"message": "3 scripts updated — re-run to verify"
}
No authentication required. Use this in uptime monitors and CI readiness probes.
GET /api/health Returns service status, region, and build commit
curl https://api.testnova.app/api/health
{
"status": "ok",
"service": "@satumm/api",
"region": "sin1",
"commit": "a3f9c12",
"timestamp": "2026-06-06T12:00:00Z"
}