Artillery loading testing for MeteorJS applications
Engine supports meteor features:
- Meteor call
- Meteor subscribe
- Login
Install Artillery and Meteor engine
npm i -g artillery
npm i -g artillery-engine-meteor
Create artillery config file:
config:
target: "ws://localhost:3000/websocket" # your app url
phases:
- duration: 60
arrivalRate: 20
engines:
meteor: {} # include meteor engine
scenarios:
- engine: "meteor" # meteor scenario
flow: # scenario flow
- login: # login first
username: USERNAME
password: PASSWORD
- call: # then Meteor.call
name: "method name"
payload: # make sure payload is Array type
- _id: "Payload"
- subscribe: # subscribe to publication
name: "pub name"
payload: # make sure payload is Array type
- "Payload"
Run config:
artillery run config.yml
- Tests
- Add logout and unsubscribe functions