# Load & stress test simulation

An image

# Virtual performance environment

The load and stress test environment simulates a realistic payload of virtual requests to a specific server. As we can see below we are simulating an arrival (payload) of virtual users in order to guage the amount of traffic our application can take. The below example simulates two requests for a duration of two seconds which will then ramp up to a total of four requests for four seconds. We are testing the security of the application by targeting the "/genres" endpoint and inserting random strings and numbers by GET and POST requests. Lastly, we're expecting the requests to fail and receive a status code 400 per request.

    fuzzer: {}
  target: 'http://localhost:3000'
    - duration: 2
      arrivalRate: 2
      rampTo: 4
      name: 'Warming up the app'
    - duration: 4
      arrivalRate: 4
      name: 'Max load'
  - flow:
      - get:
          url: '/genres-{{ naughtyString }}'
            - statusCode: 400
      - post:
          url: '/genres'
            id: ''
            name: '{{ naughtyString }}' #Creates random characters (Monkey testing endpoint)
            - statusCode: 400
# can use faker as payload