@ausbom/artillery-engine-apigw-fronted-lambda
v1.0.0
Published
A custom artillery engine to invoke lambdas fronted by API gateway
Downloads
277
Readme
artillery-engine-apigw-fronted-lambda
A custom artillery engine that provides the capability to run artillery performance tests directly against lambdas that expect to be invoked by API Gateway
Adapted from https://github.com/artilleryio/artillery/blob/main/examples/artillery-engine-example/index.js
Compatibility
This project is designed to work with artillery@^2.0.0
Install
Install the plugin:
npm install -D @ausbom/artillery-engine-apigw-fronted-lambdaadd it to your config.engines object in your performance test payload yml file and set the engine for each scenario:
config:
target: my-stack-name
phases:
- arrivalCount: 1
duration: 1
engines:
apigw-fronted-lambda: {}
scenarios:
- name: do-something
engine: apigw-fronted-lambda
flow:
- invoke:
lambda: my-lambda-name
event:
pathParameters: ... # object
queryStringParameters: ... # object
body: ... # Can be an object or a string. If an object is given it is stringified
capture:
json: $.jsonPath
as: variableName
- log: 'My variable: {{ variableName }}'