Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>API Test BuilderNew to Visual Studio Code? Get it now.
API Test Builder

API Test Builder

mlourenco

|
449 installs
| (5) | Free
API Test Script Generator for Playwright and Cypress from Swagger documentation
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

API Test Builder - VS Code Extension

API Test Script Generator

Automatically generate API Test Scripts for Playwright and Cypress from Swagger Documentation.

Supports:

  • OpenAPI 3.0 version
  • Swagger 2.0 version

Usage

  1. Open the Swagger Documentation (JSON file) in VS Code;
  2. Right-click anywhere in the code editor;
  3. Click the API Test Builder menu;
  4. Click the desired option;
    • Swagger to Cypress
    • Swagger to Playwright
  5. Voilà! The extension will generate the directories and test script templates. All you need to do is adjust the indentation and add the test scenarios you want/need.

known issues

  • Requires proper indentation
  • Playwright. Requires proper definition of "import" (Java and Python) and "using" (.Net)

Help us improve. Report a Issue.

Try the Extension

Want to try the extension but don't have a Swagger documentation file? You can use the Swagger Petstore examples:

  • For Swagger Petstore 2.0 use .json file: https://petstore.swagger.io/v2/swagger.json
  • For Swagger Petstore 3.0 use .json file: https://petstore3.swagger.io/api/v3/openapi.json

Features

  • Generates tests: Creates test scripts based on the source specification (Swagger/OpenAPI)
  • Organizes tests by tag: Groups generated tests into folders based on the tags defined in your source file
  • Handles multiple HTTP methods: Supports GET, POST, PUT, DELETE, and other HTTP methods defined in your source file.
  • Resolves schema references ($ref): Correctly handles references within your schema definitions.
  • Generates sample requests: Creates sample request bodies based on your schema definitions.
  • Includes basic response assertions: Adds expect statements to check the response status code.
  • Clean file structure: Creates a well-organized directory structure for your tests, making them easy to manage.

Motivate us

If this is what you were looking for, please consider giving us a 5-star rating.

We love suggestions. Leave yours.

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

Resources and Information

Code of Condut • License MIT • Security • Changelog • Discussions

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