Socket
Socket
Sign inDemoInstall

serverless-test-plugin

Package Overview
Dependencies
25
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    serverless-test-plugin

Serverless Test Plugin - Tests serverless endpoints.


Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

#Serverless Test Plugin

Simple Integration Test Framework for Serverless. This plugin is basically a reimplementation of the run command, validating a function's success. You can test all functions of your component by passing the --all option, and write the results into a JUnit compatible reports XML by specifying --out <file-name>.

This plugin is intended to run besides your regular Unit Tests such as Mocha.

Note: Serverless v0.1.4 or higher is required.

The easiest example of running this plugin is

serverless function test --all

###Configuration

This plugin can be configured on a function level by adding a test definition to the custom section in your s-function.json.

Example:

"custom": {
  "test": {
    "skip": true
  }
}

Available options are

  • skip - boolean; skip this function from all tests
  • event - string; name of the event JSON definition; defaults to event.js

###Usage

Test an individual function:

serverless function test <component>/<module>/<function>

Test all functions in the project:

serverless function test --all

Test all functions and output results into a JUnit compatible XML:

serverless function test --all --out test_results/report.xml

Keywords

FAQs

Last updated on 25 Jan 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc