Environment Factory Guide
Full protocol, security model, and implementation details for any language or framework.
Autonoma is an agentic end-to-end testing platform. Users create and run automated tests for web, iOS, and Android applications using natural language. The system executes tests on real devices and emulators, with AI models handling element selection, assertions, self-healing, and agentic decision-making.
To connect your application with Autonoma, you need to implement the Environment Factory — a single POST endpoint that Autonoma calls to create and destroy isolated test environments before and after E2E tests.
The endpoint handles three actions:
| Action | When it’s called | What you do |
|---|---|---|
| discover | When Autonoma connects | Return a list of available scenarios (e.g., “standard”, “empty”) |
| up | Before each test run | Create data in your database, generate auth credentials, return both |
| down | After each test run | Verify the request is legitimate, then delete the data you created |
Before each test run:
action: "up" and a scenario nameaction: "down" with signed refsThe signed refs mechanism ensures teardown can never delete data it didn’t create — even if someone gains access to your endpoint.
Environment Factory Guide
Full protocol, security model, and implementation details for any language or framework.
Next.js Example
Complete working example with Next.js + Prisma + PostgreSQL, including integration tests.