Skip to content

Instantly share code, notes, and snippets.

@morintd
Created July 5, 2024 16:57
Show Gist options
  • Save morintd/115b54c0c76b91a8c0050abc4ece10b4 to your computer and use it in GitHub Desktop.
Save morintd/115b54c0c76b91a8c0050abc4ece10b4 to your computer and use it in GitHub Desktop.
config:
environments:
nest-fastify:
target: '[NEST FASTIFY URL]'
nest-express:
target: '[NEST EXPRESS URL]'
fastify:
target: '[FASTIFY URL]'
express:
target: '[EXPRESS URL]'
processor: './artillery-processor.js'
plugins:
expect: {}
scenarios:
- name: 'create a new user and article flow'
flow:
- post:
url: '/auth/register'
beforeRequest: register
json:
email: '{{ email }}'
password: '{{ password }}'
expect:
- statusCode: 201
- post:
url: '/auth/login'
json:
email: '{{ email }}'
password: '{{ password }}'
expect:
- statusCode: 201
- post:
url: '/article'
beforeRequest: generateArticle
json:
title: '{{ title }}'
content: '{{ content }}'
expect:
- statusCode: 201
- get:
url: '/article?page=1'
expect:
- statusCode: 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment