Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

portman-sugar

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

portman-sugar

Enhances Portman with modular test configurations, automated test discovery, and predefined overrides for streamlined API testing workflows.

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
215
decreased by-42.51%
Maintainers
0
Weekly downloads
 
Created
Source

Portman-Sugar

Extend the capabilities of Portman with portman-sugar, a module designed to streamline the management and execution of API tests using the Portman framework. portman-sugar simplifies test configurations, supports modular test files, and enhances test maintenance and readability.

Features

  • Modular Test Configuration: Manage your tests in separate files with the ability to declare API operations once per file.
  • Automated Test Discovery: Automatically finds test files in a specified directory.
  • Predefined Configurations: Comes with a set of predefined configurations which you can easily override according to your testing needs.
  • Integration with Portman: Fully compatible with Portman; you can use portman-sugar alongside other Portman tools without any conflict.

Installation

Install portman-sugar via npm:

npm install --save-dev portman-sugar

Usage

  1. Prepare your test files in a specified directory. Each test file should declare an API operation and may include variations and assigned variables.

  2. Run the tool using the command-line interface. Here are some options you can configure:

npx portman-sugar --testFolder ./path/to/tests --collectionName "Your Collection Name"

Command-Line Options

  • --testFolder: Path to the folder containing test files.
  • --collectionName: Name of the generated Postman collection.
  • --openApi: Path to your OpenAPI specification file (default: ./openapi.yaml).
  • --output: Path for the output Postman collection JSON file (default: ./postman.collection.json).

Additional options include setting paths for various configurations like --authConfig, handling different types of tests (--contractTests, --fuzzingTests), and excluding default configurations with --excludeDefault.

Example

Below is an example command to run portman-sugar:

node dist/index.js --testFolder ./api-tests --collectionName "API Collection" --output ./output/postman.collection.json

Contributing

Contributions are welcome! Please open an issue to discuss your ideas or submit a pull request.

License

This project is licensed under the ISC License - see the LICENSE file for details.

Keywords

FAQs

Package last updated on 19 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc