Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 3.09 KB

README.md

File metadata and controls

59 lines (39 loc) · 3.09 KB

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:

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 CondutLicense MITSecurityChangelogDiscussions