Skip to content

Features

Everything you need to mock it right

Testfly turns any OpenAPI spec into a fully functional mock API with relationally-consistent data, real CRUD operations, and complete workspace isolation. No backend code required.

Core differentiator

Relational Consistency

Other mock tools return flat, disconnected JSON. Testfly generates data with real foreign key relationships. When your spec defines a Pet with an owner_id, every pet references an actual user record. No orphaned IDs. No broken references. Just data that works like production.

  • Automatic FK detection

    We detect foreign keys from property names, $ref references, and x-fk extensions in your spec. No manual configuration.

  • Topological ordering

    Data is generated in dependency order. Parent records exist before child records reference them. Circular FKs are detected and handled.

  • Cross-endpoint integrity

    GET /pets/abc123 returns an owner_id that resolves when you GET /users/{owner_id}. Your integration tests work end-to-end.

Petstore Workspace

3 resources · 5 relationships · 100 rows each

# GET /pets/a1b2c3

{

  "id": "a1b2c3",

  "name": "Luna",

  "owner_id": "u_7f8e" // real user

}

# GET /users/u_7f8e

{

  "id": "u_7f8e",

  "name": "Sarah Chen",

  "email": "sarah.chen@example.com"

}

FK integrity verified · 0 orphaned references

Generated Data Preview

users table · 100 rows · seed: 42

Semantic
name email price
Sarah Chensarah.chen@example.com$49.99
Marcus Johnsonm.johnson@company.co$129.00
Aiko Tanakaaiko.t@startup.io$24.95

Names, emails, and prices generated from column semantics — not random strings

Smart generation

Semantic Fake Data

Testfly doesn't generate random gibberish. Our engine reads column names and types to produce realistic, contextually appropriate data. An "email" field gets a real email. A "price" field gets a realistic decimal. A "phone" field gets a formatted phone number.

  • Column-aware generation

    Fields named "email", "phone", "url", "price", "name", "address" etc. produce data that matches their intent.

  • Reproducible with seeds

    Set a seed value and get the same data every time. Perfect for deterministic tests and consistent demos.

  • Configurable row counts

    Generate 10 rows for quick testing or 10,000 for load testing. Per-resource overrides let you control the data volume exactly.

Real operations

Full CRUD Operations

This isn't a static response server. Testfly gives you a real database behind every mock API. POST creates records that persist. PUT updates them. DELETE removes them. GET returns paginated, filterable, sortable results from an actual data store.

  • Pagination built-in

    Every list endpoint returns paginated results with page, pageSize, totalCount, and totalPages metadata.

  • Filtering and sorting

    Filter by any field with query params. Sort ascending or descending by any column. Works exactly like a real API.

  • Data reset anytime

    One API call regenerates your entire dataset from scratch. Perfect for resetting between test runs.

Full CRUD lifecycle
# List with pagination
$ curl petstore.mock.testfly.com/pets?page=1&pageSize=2
200 { "data": [...], "meta": { "totalCount": 100 } }

# Create
$ curl -X POST .../pets -d '{"name":"Bella"}'
201 Created { "id": "new_id", "name": "Bella" }

# Update
$ curl -X PUT .../pets/new_id -d '{"name":"Bella Mae"}'
200 OK { "id": "new_id", "name": "Bella Mae" }

# Verify update persisted
$ curl .../pets/new_id
200 OK { "id": "new_id", "name": "Bella Mae" }

# Delete
$ curl -X DELETE .../pets/new_id
204 No Content
openapi.yaml
openapi: 3.1.0
info:
  title: Petstore API
  version: 1.0.0
paths:
  /pets:
    get:
      summary: List all pets
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pet'
components:
  schemas:
    Pet:
      type: object
      properties:
        id: { type: string, format: uuid }
        name: { type: string }
        species: { type: string, enum: [cat, dog, bird] }
        owner_id: { type: string, format: uuid }

Universal compatibility

Any OpenAPI Spec

Supports OpenAPI 2.0 (Swagger), 3.0, and 3.1. Paste YAML or JSON. Testfly parses every schema, detects relationships, maps routes, and provisions your mock API automatically.

  • allOf / oneOf / anyOf composition handling
  • Nested objects, arrays, and enum types
  • Automatic route mapping from paths + operations
  • Default CRUD routes for resources without explicit paths
app.testfly.com/workspaces/pet-store

Pet Store API

pet-store.mock.testfly.com

Active
Overview Resources Routes Settings Usage
Method Path Resource
GET/petspets
POST/petspets
GET/pets/{id}pets
PUT/pets/{id}pets
DEL/pets/{id}pets

Visual management

Web Dashboard

The Testfly Portal gives you a complete visual interface for managing your mock APIs. Create workspaces, upload specs, browse generated data, configure settings, and monitor usage — all from your browser. No CLI or API knowledge needed.

  • Full workspace lifecycle

    Create, configure, pause, resume, regenerate, and delete workspaces. Upload specs with a text area — paste YAML or JSON and go.

  • Inspect everything visually

    Tabbed views for resources, routes, relationships, settings, and usage. See exactly what Testfly generated from your spec.

  • API key management

    Create scoped API keys, set expiration dates, and revoke access — all from the settings panel. No code required.

Prefer the terminal?

Testfly CLI

Everything you can do in the dashboard, you can also do from the terminal. Install as a .NET global tool and get full control over workspaces, specs, and mock endpoints without opening a browser. Perfect for scripting, CI pipelines, and developers who live in the terminal.

  • Full workspace management

    Create, list, update, pause, resume, regenerate, and delete workspaces. Set default workspaces so you can skip the ID every time.

  • Spec upload from files

    Upload OpenAPI specs directly from local files. Inspect parsed resources and routes to verify your spec was understood correctly.

  • Quick mock testing

    Fire HTTP requests at mock endpoints with testfly mock. Add custom headers, send JSON bodies, and see colored status responses.

$ dotnet tool install -g Testfly.Cli
testfly cli
$ testfly workspace list

ID          NAME        SLUG        STATUS  ROWS
--------    --------    --------    ------  ----
7f8e3a1b..  Petstore    petstore    Active  100
a2c4e6g8..  Payments    payments    Active  500

$ testfly spec upload --file petstore.yaml
[OK] Spec uploaded: d9f1b2c3...

$ testfly mock petstore GET /pets
HTTP 200  GET /mock/petstore/pets
{
  "data": [
    { "id": "a1b2", "name": "Luna" }
  ],
  "meta": { "totalCount": 100 }
}

And more

Everything else your team needs

Instant Provisioning

Upload a spec and your mock API is live within seconds. Each workspace gets its own subdomain and isolated data store.

Simulated Conditions

Configure latency, error rates, and CORS per workspace. Test how your frontend handles slow responses and 500 errors.

Workspace Isolation

Every workspace runs its own isolated database. No data leaks between teams or projects. Delete a workspace, all data is gone.

Team Collaboration

Organization-level access control. Share workspaces across your team. Manage API keys and permissions from the dashboard.

REST API

Full platform API for managing workspaces, specs, and data programmatically. Automate workspace creation in your CI pipeline.

CLI Tool

Manage workspaces, upload specs, and test mock endpoints from your terminal. Install with dotnet tool install -g Testfly.Cli.

Mock Auth

Add bearer token or API key auth to mock endpoints. Validates that headers are present so your client code confirms its auth logic works.

Usage Dashboard

Monitor request counts, data usage, and workspace health from a single dashboard. Track trends and manage resources.

Configurable volume

10 rows or 10 million. Your call.

Need a quick prototype with 10 records? Done in milliseconds. Running load tests against 10 million rows of realistic, relationally-consistent data? We handle that too. Set rowCount when creating a workspace and Testfly generates exactly the volume you need.

10
Demos & prototypes
100
Development
1,000
Integration tests
10,000
Load testing
data generation
# Quick prototype — 10 rows
$ curl -X POST .../api/workspaces \
  -d '{ "slug": "demo", "rowCount": 10 }'

# Load testing — 1 million rows
$ curl -X POST .../api/workspaces \
  -d '{ "slug": "loadtest", "rowCount": 1000000 }'

# Reproducible data for CI
$ curl -X POST .../api/workspaces \
  -d '{ "slug": "ci", "rowCount": 100, "seedValue": 42 }'

# Regenerate with different volume
$ curl -X PUT .../api/workspaces/{id} \
  -d '{ "rowCount": 10000 }'
$ curl -X POST .../api/workspaces/{id}/regenerate

Use cases

Built for teams that move fast

Frontend Development

Build your UI without waiting for the backend team. Get a fully functional API from day one of development. POST, PUT, DELETE all work — test complete user flows end to end.

QA & Integration Testing

Run integration tests against a predictable, isolated data set. Use seed values for reproducible test data. Reset the database anytime with one API call.

Rapid Prototyping

Design your API spec first, get a working mock immediately. Iterate on the spec, regenerate data, and keep prototyping without writing backend code.

Sales Demos

Show a fully working API to prospects with realistic data. Spin up a fresh workspace for every demo, tear it down after. No demo environment to maintain.

Ready to mock it right?

Upload your OpenAPI spec and get a live mock API in seconds. Free to start.