Ever wondered how TESTIO.AI generates comprehensive REST API test cases from your OpenAPI spec? Let's dive into the architecture. 🔍
The AI Agent Loop
TESTIO.AI uses Claude as its underlying AI model with a specialized system prompt that encodes REST API testing expertise. The agent loop works like this:
- Parse Input: The agent receives your OpenAPI specification
- Analyze Endpoints: Claude identifies all REST endpoints, parameters, and schemas
- Generate Tests: The agent calls specialized tools to create REST API test cases
- Write Output: Test files are written in a human-readable YAML format
Streaming Responses
Unlike traditional AI tools, TESTIO.AI streams responses in real-time. You can watch the AI reason through your REST API spec:
◐ Analyzing OpenAPI specification...
├─ Tool: parse_openapi_spec
│ Found 12 REST endpoints across 3 tags:
│ • pets (5 endpoints)
│ • stores (4 endpoints)
│ • users (3 endpoints)
├─ Thinking...
│ I'll generate REST API test cases for each endpoint...Specialized REST API Testing Tools
The agent has access to purpose-built tools for REST API testing:
- parse_openapi_spec: Extracts REST endpoint information from your spec
- generate_test_case: Creates individual REST API test cases with curl commands
- write_test_file: Outputs YAML test suite files
- run_curl_test: Executes HTTP requests and captures responses
- validate_response: Checks REST API responses against expected outcomes
Why curl-Based Tests?
TESTIO.AI generates curl commands for maximum portability:
- Run anywhere without dependencies
- Easy to debug and modify HTTP requests
- Version control friendly
- Works in any CI/CD environment
- Universal REST API testing standard
The Test Case Format
Generated REST API tests use a clean YAML format:
tests:
- name: GET /users returns 200 with list
curl: |
curl --request GET \
--url "${BASE_URL}/users" \
--header "Authorization: Bearer ${AUTH_TOKEN}"
expect:
status: 200
body:
- path: "$"
operator: is_arrayThis format is human-readable, editable, and works seamlessly with version control systems.
From Input to Output—Tested by AI
TESTIO.AI takes your OpenAPI spec as input and delivers validated, passing REST API tests as output. That's our promise: from input to output, tested by AI.
