DEV Community

Cover image for APIs Load Testing with Artilley
tkssharma
tkssharma

Posted on

2

APIs Load Testing with Artilley

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

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more