How to make Load and Smoke testing with Artillery

Artillery is a CLI tool installed easily through npm


May 20, 2021
featured image

Overview

Artillery is a CLI tool installed easily through npm

Artillery is a modern load testing and smoke testing solution designed for cross-functional teams that run microservice-based systems on AWS and rely on CI/CD to ship at high velocity

We are going to see how to install it and run some load tests from our computer

System requirements

Artillery is a CLI application that is installed on your computer. Artillery runs on Windows, MacOS, and Linux systems with Node.js v12 or above installed.

Installation

To install global in your computer


$ npm install -g artillery

Check installation

$ artillery dino
 ------------
< Artillery! >
 ------------
          \
           \
            ..`
            ;:,'+;
            ,;;,,;,
              #:;':
              @';'+;
            `::;''';
            '; ,:'+;;
  `,,`      .;';'+;'
 ;   `'+;;;::';++':,;
        `+++++##+'';#
           .;+##+''';
            '+##'''#'
           ++# +;'.##
           ##, `: .#,
          :#      '+
          #.      '
          #       +
         :+       #'
         #+`       ';.

    
Check version

$  artillery --version
        ___         __  _ ____                  _
  _____/   |  _____/ /_(_) / /__  _______  __  (_)___  _____
 /____/ /| | / ___/ __/ / / / _ \/ ___/ / / / / / __ \/____/
/____/ ___ |/ /  / /_/ / / /  __/ /  / /_/ / / / /_/ /____/
    /_/  |_/_/   \__/_/_/_/\___/_/   \__, (_)_/\____/
                                    /____/

------------ Version Info ------------
Artillery: 1.7.2
Artillery Pro: not installed (https://artillery.io/pro)
Node.js: v14.15.0
OS: darwin/x64
--------------------------------------

Run quick test

20 virtual users that send 100 requests GET each of them

$ artillery quick --count 20 --num 100 https://yoursite.com
All virtual users finished
Summary report @ 23:21:14(-0300) 2021-05-19
  Scenarios launched:  20
  Scenarios completed: 20
  Requests completed:  2000
  Mean response/sec: 26.94
  Response time (msec):
    min: 28
    max: 912
    median: 233
    p95: 594
    p99: 720.5
  Scenario counts:
    0: 20 (100%)
  Codes:
    200: 2000

See the Artillery's command line reference

Photo by Tengyart on Unsplash


nodejs artillery testing