super-api-tester
v1.7.0
Published
A high-performance, schema-driven API automation framework.
Maintainers
Readme
🛠️ super-api-tester
An advanced, multi-protocol automated QA engine and test generation framework. Driven by structural contract analysis and autonomous predictive AI routines, super-api-tester builds, executes, validates, and auto-heals production-grade integration tests using a centralized workspace engine built on top of Vitest.
🚀 Key Features
- Multi-Protocol Driver Engine: Native execution handlers routing seamlessly to REST, GraphQL, and MCP (Model Context Protocol).
- Autonomous AI Test Generation: Uses Gemini (
gemini-2.5-flash) to analyze specifications or intent strings and dynamically scaffold complete Vitest execution files. - Self-Healing Runtime Sync: Watches console error stacks and runtime drifts during failures, calling the AI Healer to automatically re-write and repair broken scripts.
- Predictive Impact Assessment: Analyzes incremental Git code deltas against known code paths to execute only tests affected by active code drifts.
🔌 Operational Matrix & Installation
Initialize your working directory layout, set package module constraints, and provision core testing environments automatically:
npx super-api-tester init
Setup your API Engine CredentialsFor autonomous generation and test script healing passes, configure your Google Gemini workspace credential within your environment:Bash# Windows Command Prompt (CMD)
set GEMINI_API_KEY="your_api_key_here"
# Windows PowerShell
$env:GEMINI_API_KEY="your_api_key_here"
# Linux / macOS / Git Bash
export GEMINI_API_KEY="your_api_key_here"
🛠️ Direct Driver Execution (exec)Test individual endpoints instantly from your command line interface. The system uses intelligent payload unwrapping and strict protocol drivers to pass criteria to targeted backends.
1. REST CallsPass target destinations and parameters to fire direct HTTP transport states:Bashnpx super-api-tester exec "[https://jsonplaceholder.typicode.com/posts/1](https://jsonplaceholder.typicode.com/posts/1)" "{}" --protocol REST
2. GraphQL QueriesSupports raw queries or structured JSON wrapping. The engine automatically handles extraction and overrides standard payload formatting limits:Bashnpx super-api-tester exec "[https://countries.trevorblades.com/](https://countries.trevorblades.com/)" "{\"query\": \"query { continents { name code } }\"}" --protocol GRAPHQL
3. MCP (Model Context Protocol) ToolsRoute execution commands directly through active local or remote client-server tool pipelines:Bashnpx super-api-tester exec "http://localhost:3000/sse" "{\"tool\": \"read_file\", \"args\": {\"path\": \"package.json\"}}" --protocol MCP
🧠 Autonomous AI Test Generation Pipeline (--ai)Generate target assertion scripts using full specifications or plain text intents. By using explicit protocol overrides, the AI stops writing generic fetch calls and writes scripts bound to your project's custom drivers.
REST Spec TestingBashnpx super-api-tester --ai "Verify post 1 has user ID 1 and non-empty title" --url "[https://jsonplaceholder.typicode.com/posts/1](https://jsonplaceholder.typicode.com/posts/1)" --protocol REST
GraphQL Complex Contract TestingBashnpx super-api-tester --ai "Get all continent codes and names and assert Europe exists" --url "[https://countries.trevorblades.com/](https://countries.trevorblades.com/)" --protocol GRAPHQL
MCP Tool Pipeline ValidationBashnpx super-api-tester --ai "Call the filesystem read_file tool on package.json and assert the name property matches" --url "http://localhost:3000/sse" --protocol MCP