DOCUMENTATION · PYTEST ENGINE V0.2

API, backend, data and AI tests — one independent Python engine.

Run TestPilotWorks-Pytest on its own, or connect it to the TestPilotWorks control plane. The integration exists in the codebase; hosted production runs require a deployed, connected engine service.

01 · OVERVIEW

Two engines, one QA workspace.

Playwright handles UI and browser journeys through Private Runners. Pytest focuses on API, backend, data and AI testing through a separately deployable Python service. TestPilotWorks unifies run submission, state and aggregate reporting without combining execution queues.

TestPilotWorks control plane | | Playwright Pytest | | Private Runner TestPilotWorks-Pytest | | UI / E2E API / Backend / Data / AI

The Pytest engine is a separately deployable, proprietary component. Approved customers can use it in enterprise projects, Docker and CI under an appropriate agreement. Request a demo or evaluation access →

02 · QUICK START

Run locally with Docker after approved access.

For an authorized deployment, obtain the engine package or repository access from TestPilotWorks, then configure the environment and start the container.

cd TestPilotWorks-Pytest cp .env.example .env # Configure required engine credentials in .env docker compose up --build

Check http://localhost:8080/health. Interactive OpenAPI docs are available at http://localhost:8080/docs. Set TPW_ENGINE_API_KEY for authenticated engine use.

03 · ENGINE API V1

Stable execution contract.

METHODENDPOINT
GET/health
GET/v1/engine
POST/v1/runs
GET/v1/runs/{run_id}
POST/v1/runs/{run_id}/cancel
GET/v1/runs/{run_id}/artifacts/junit
curl -X POST http://localhost:8080/v1/runs \ -H 'content-type: application/json' \ -H "authorization: Bearer $TPW_ENGINE_API_KEY" \ -d '{"suite":"api-demo.yaml","environment":"staging","variables":{"base_url":"https://staging.example.com"}}'

Suite names refer to YAML suites available on the Pytest service. Results include execution status and supported test summary fields.

04 · CONNECT

Connect an independent Pytest service.

Set these values on the TestPilotWorks server-side control plane:

PYTEST_ENGINE_URL=https://pytest-engine.example.com PYTEST_ENGINE_API_KEY=<strong-shared-secret>

Set the matching value on the Pytest service:

TPW_ENGINE_API_KEY=<same-shared-secret>

Configure the project target URL, select Pytest in Run test, and choose a suite such as api-demo.yaml. The control plane calls the Engine API and synchronizes status into Execution History. This does not use Playwright's job lease queue.

Production availability: source integration does not mean the managed Pytest service is live. Production execution requires a deployed engine, secret setup and an end-to-end connectivity check. Request a deployment demo.
05 · SECURITY

Separate credentials and data boundaries.

  • Keep bearer tokens server-side, never in browser JavaScript.
  • Use HTTPS and restrict inbound access to the engine service.
  • Use isolated execution and least-privilege credentials for customer systems.
  • Use read-only SQL accounts by default and redact sensitive outputs.
  • Restrict target hosts and limit execution time in production deployments.
06 · TROUBLESHOOTING

Verify the full execution path.

  • Connection failed: check deployed engine URL, TLS and service health.
  • 401 Unauthorized: verify both API key values match.
  • Suite not found: check YAML suite filenames in the engine's suites directory.
  • Wrong target: check project targetBaseUrl and runtime variables.

See the main documentation or request evaluation access for a managed or standalone deployment.