Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Auto Api Testing Tool AINew to Visual Studio Code? Get it now.
Auto Api Testing Tool AI

Auto Api Testing Tool AI

console code

|
16 installs
| (0) | Free
Enable developers to run AutoAPI commands (init, test, show) via UI elements, view results, and watch OpenAPI changes.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

🚀 AutoAPI VS Code Extension

AutoAPI is a Visual Studio Code extension that integrates with the autoapi-cli tool to generate and run tests from your OpenAPI specification using OpenAI's GPT models. It simplifies test automation and improves API test coverage directly from your editor.


✨ Features

  • ⚙️ One-click setup with AutoAPI: Init
  • 🧪 Run AutoAPI: Test directly from VS Code
  • 🧠 Automatically generates API tests using OpenAI
  • 📁 Detects changes in openapi.yaml or openapi.json and prompts re-testing
  • 🔐 Prompt to enter and persist your OpenAI API key securely
  • 📊 View test results in a custom AutoAPI Results sidebar tree
  • 🖥️ View command output in the AutoAPI Output Channel
  • 📂 Webview-based sidebar UI to edit .autoapi.config.json
  • 📡 Automatically reloads results if .autoapi/results/last-run.json is updated
  • 🌐 Tunnel Mode to expose localhost APIs using a custom subdomain (via localtunnel)

📦 Requirements

  • Node.js v18 or later
  • autoapi-cli

Install globally:

npm install -g autoapi-cli

⚙️ Extension Settings

Setting Description
autoapi.openaiKey Your OpenAI API key used for GPT-powered testing

Set it in your VS Code settings.json:

{
  "autoapi.openaiKey": "sk-..."
}

📁 Example Workflow

  1. Open your project containing openapi.yaml or openapi.json.
  2. Open the AutoAPI sidebar or run the command: AutoAPI: Init.
  3. Enter:
    • OpenAPI spec path
    • Base URL of your API
    • Optional headers (e.g., Authorization)
    • K6 server URL (for performance testing)
    • Optionally enable Tunnel Mode
      • Set port (e.g., 3000)
      • Set subdomain (e.g., my-api)
  4. Click "Save Config" or "Update Config"
  5. Click "Run Tests" to generate and execute tests
  6. View test results in the AutoAPI Results view or .autoapi/results/last-run.json

🌐 Tunnel Mode

If your API is running on localhost, you can expose it to the internet using a secure tunnel:

  • Enable Tunnel Mode
  • Set:
    • Port: Local port of your API (e.g., 3000)
    • Subdomain: Unique subdomain for public access (e.g., my-api)
  • AutoAPI uses localtunnel to generate a live base_url

💡 Tunnel will auto-close and regenerate on "Restart Tunnel"


🗂 File Structure

.your-project/
├── openapi.yaml
├── .autoapi.config.json       # Stores config like base_url, headers, etc.
└── .autoapi/
    └── results/
        └── last-run.json      # Contains latest test results

📝 Release Notes

2.2.0

  • ✅ Tunnel Mode support added via localtunnel
    • New UI
    • Generate spec file using curl option

2.1.0

  • ✅ Tunnel Mode support added via localtunnel
    • Custom port and subdomain
    • One-click tunnel restart
    • Automatically updates base_url

2.0.0

  • 📂 Sidebar UI to configure .autoapi.config.json
  • 🧪 Run tests and 📊 show results from sidebar

1.0.0

  • autoapi init
  • autoapi test
  • Result Tree View
  • .autoapi.config.json generation
  • OpenAI key integration
  • Auto-refresh on result change

📚 Resources

  • AutoAPI CLI GitHub
  • OpenAPI Specification
  • OpenAI API Docs

🙌 Contributing

We welcome contributions! Please create issues or pull requests at GitHub Repo


🧩 Extension Guidelines

This extension follows official VS Code Extension Guidelines


Enjoy using AutoAPI!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft