APIs Load Testing with Artilley

tkssharma - Aug 27 - - Dev Community

This Video is talking about how to perform load testing of apis using artillery

config:
  http:
    extendedMetrics: true
  # This is a test server run by team Artillery
  # It's designed to be highly scalable
  target: http://127.0.0.1:3010/restaurants
  tls:
  rejectUnauthorized: false
  phases:
    - duration: 30
      arrivalRate: 1
      rampTo: 5
      name: Warm up phase
    - duration: 30
      arrivalRate: 5
      rampTo: 10
      name: Ramp up load
    - duration: 60
      arrivalRate: 10
      rampTo: 30
      name: Spike phase 
  # Load & configure a couple of useful plugins
  # https://docs.art/reference/extensions
  plugins:
    ensure: {}
    apdex: {}
    metrics-by-endpoint: {}
  apdex:
    threshold: 100
  ensure:
    thresholds:
      - http.response_time.p99: 100
      - http.response_time.p95: 75
scenarios:
  - flow:
      - loop:
          - log: 'New virtual user running'
          - get:
              url: '/search?search_text=uber&page=1&limit=10'
        count: 100
Enter fullscreen mode Exit fullscreen mode

Github
https://github.com/tkssharma/nodejs-api-load-tests

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player