artillery-engine-cothority
v1.0.3
Published
Cothority engine for Artillery
Downloads
4
Readme
Artillery Cothority Engine
About
This engine allows using Artillery.io to load test Cothority using the NPM library @dedis/cothority
Usage
Installation
# Assumes artillery is already installed
npm install -g artillery-engine-cothority
Script Params
config.target
is ignored by the engine- Specify the rosterFile location in
config.cothority.rosterToml
and service inconfig.cothority.service
- Add
cothority
tocothority.engines
- Use
engine: "cothority"
in your scenario
Example Script
config:
target: "http://localhost:7003"
# Authentication Server Host
authHost: "http://localhost:3000"
# External javascript file
processor: "./processor.js"
phases:
# 10 users per second linearly ramped up to 50 users per second within 120s
- duration: 120
arrivalRate: 10
rampTo: 50
name: "Warm up"
# Stress stest with 50 users per second for 300s
- duration: 300
arrivalRate: 50
name: "Under load"
cothority:
service: "evoting"
rosterToml: "/path/to/public.toml"
engines:
cothority: {}
scenarios:
- engine: "cothority"
name: "Ping"
beforeScenario: "somefunction"
flow:
- send:
request: "Ping"
response: "Ping"
beforeRequest: "somefunction2"
data:
nonce: "{{ $randomNumber(1, 1000) }}"
capture:
- nonce
- log: "{{ nonce }}"
Run the script
artillery run script.yml