Automated Software Testing and Analysis Platform
ASTAP is a pipeline-oriented platform for cloning GitHub repositories, freezing immutable snapshots, discovering Python test targets, generating AI-authored pytest files, and surfacing run progress through a web UI.
It is designed around one strict rule: Postgres is the source of truth. Redis is used only for job delivery, and large artifacts live in Supabase Storage.
Important
The current implementation fully supports ingest, discover, and generate_tests. The execute_tests and analyze stages are defined in the architecture but are not implemented yet.
- Immutable snapshot per run using
git archive - Stage-based pipeline with explicit
runsandjobs - Atomic job claiming to avoid duplicate execution
- Python AST-based target discovery
- FastAPI endpoint detection for API target generation
- OpenAI-powered pytest generation for supported targets
- Supabase-backed auth, database, and artifact storage
- React dashboard for projects, runs, timelines, artifacts, and generated tests
- Docker Compose setup for local development
| Landing | Projects | Run Detail |
|---|---|---|
![]() |
![]() |
![]() |
More UI snapshots are available in docs/assets.
ASTAP is split into five runtime surfaces:
client: React + Vite frontendapi: FastAPI control planeworker: RQ workers for async pipeline stagesqueue: Redis transportSupabase: Postgres, Auth, and Storage
flowchart LR
U[User] --> C[React Client]
C -->|Supabase Auth| SA[(Supabase Auth)]
C -->|Bearer JWT| API[FastAPI API]
API --> DB[(Supabase Postgres)]
API --> RQ[(Redis / RQ)]
RQ --> W[Worker]
W --> DB
W --> ST[(Supabase Storage)]
ingest: clone repo, resolve commit SHA, build immutable snapshot, upload artifactdiscover: extract snapshot, parse Python code withast, persist targets, uploadtargets.jsongenerate_tests: rehydrate discovered targets, call OpenAI, store generated pytest files and manifestexecute_tests: plannedanalyze: planned
.
├── api/ FastAPI application
├── client/ React frontend
├── worker/ RQ jobs and providers
├── shared/ Shared DB, schema, queue, storage, and target logic
├── migrations/ SQL schema and target-model migrations
├── scripts/ Local and Supabase schema helpers
├── tests/ Backend test coverage
└── docker-compose.yml Local runtime stack
- Docker and Docker Compose
- A Supabase project
psqlfor applying schema scripts- An OpenAI API key if you want to run
generate_tests
cp .env.example .envSet at least these values in .env:
DATABASE_URLREDIS_URLSUPABASE_URLSUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYSUPABASE_DB_URLSUPABASE_STORAGE_BUCKETOPENAI_API_KEYfor test generation
For Supabase:
./scripts/apply_supabase_schema.shFor a local Postgres instance:
./scripts/apply_local_schema.shdocker compose up --build- Client:
http://localhost:3000 - API docs:
http://localhost:8000/docs - RQ dashboard:
http://localhost:9181
The main runtime configuration is defined in shared/config.py.
| Variable | Purpose |
|---|---|
DATABASE_URL |
SQLAlchemy connection string for API and worker |
REDIS_URL |
Redis connection used by RQ |
SUPABASE_URL |
Supabase project URL |
SUPABASE_ANON_KEY |
Frontend auth key |
SUPABASE_SERVICE_ROLE_KEY |
Worker/API access for storage operations |
SUPABASE_DB_URL |
Database URL used by schema scripts |
SUPABASE_STORAGE_BUCKET |
Private artifact bucket, typically runs |
API_CORS_ORIGIN |
Allowed frontend origin |
OPENAI_API_KEY |
Required when generate_tests runs |
GENERATE_TESTS_MODEL |
LLM used for pytest generation |
GENERATE_TESTS_MAX_TARGETS_PER_RUN |
Soft cap on generated targets per run |
GENERATE_TESTS_ENABLE_SERVICE_FUNCTIONS |
Enable unit-style target generation |
GENERATE_TESTS_ENABLE_API_ENDPOINTS |
Enable API endpoint generation |
When a user starts a run:
- The API creates a
runrow and stagejobrows. ingestis enqueued in Redis.- The worker claims the job atomically in Postgres.
- Each stage reads inputs from Postgres and Supabase Storage, works in a clean temporary directory, then writes results back.
- The frontend polls the API for run status, progress, artifacts, and generated test output.
Note
Snapshots are immutable. Later stages always operate on the archived snapshot, never directly on GitHub.
The current implementation writes generated artifacts to storage under the run prefix, including:
snapshot/snapshot.tar.gzdiscover/targets.jsongenerated_tests/test_index.json- per-target generated pytest files
generated_tests.zip
The frontend exposes both a manifest view and per-file code viewer for generated tests.
The main endpoints currently exposed by the API are:
POST /projectsGET /projectsDELETE /projects/{project_id}POST /projects/{project_id}/runsGET /runsGET /runs/{run_id}GET /runs/{run_id}/generated-tests/manifestGET /runs/{run_id}/generated-tests/tree
Interactive API docs are available at /docs when the API is running.
Backend tests:
pytestFrontend tests:
cd client
npm testFrontend dev server:
cd client
npm run devASTAP is already usable for repository ingestion, Python target discovery, and AI-based test generation, but it is still an MVP. The next major milestones are:
- test execution in isolated environments
- post-run analysis and summarization
- stronger reconciliation and crash recovery workflows
- broader language and framework support


