Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Artillery.IO Logging and Debugging

Tags:

load

artillery

I'm trying out Artillery.io (http://artillery.io) as a load and performance tool, but I can't seem to get the debugging working.

I'm seeing the output and reports get generated, but for certain HTTP responses (404/401/500.x) I want to see the packets sent and responses received retrospectively.

The documentation at https://artillery.io/docs/debugging.html#logging-everything says that I can run

set DEBUG=http,http:capture,http:response

and then launch my script using the run command (I'm on Windows).

This makes no difference at all, there is no tracing of packets sent/received in either the console or the generated report.

Anyone know how to get artillery to trace out what its doing, request by request and response? Preferably added to the report file, but I'll take console alone if I have to.

like image 233
BlackSpy Avatar asked Jul 31 '17 09:07

BlackSpy


People also ask

What is the HELP command for artillery?

Use command > artillery dino to verify artillery installation on machine. > artillery -help = List all the available commands with options. > artillery quick - Quick test command is used to run a test without the test script.

Where can we set header in artillery?

You can set your headers in default parameter inside config like this: config: target: "http://localhost:3000" phases: - duration: 10 arrivalRate: 100 defaults: headers: authorization: token ...


2 Answers

Was running this from a powershell console. Dropped down to good old CMD and it works as documented.

like image 61
BlackSpy Avatar answered Sep 27 '22 03:09

BlackSpy


Tested on Windows in Git Bash terminal.

Setting debug:

 export DEBUG=http,http:capture,http:response

Testing:

 echo $DEBUG

Running script for tests

For Artillery v2

Create file script.yml:

config:
  target: "https://httpbin.org/"
  phases:
    - duration: 3
      arrivalRate: 1
scenarios:
  - name: "Get"
    flow:
      - get:
          url: "/get"

run it: artillery run script.yml

For Artillery v1 see docs.

artillery quick -c 1 -n 1 https://httpbin.org/get

Debug response:

Started phase 0, duration: 1s @ 16:20:02(+0200) 2021-05-11
/   http request: {
  "url": "https://httpbin.org/get",
  "method": "GET",
  "headers": {
    "user-agent": "Artillery (https://artillery.io)"
  }
} +0ms
  http:response {
  http:response   "date": "Tue, 11 May 2021 14:20:03 GMT",
  http:response   "content-type": "application/json",
  http:response   "content-length": "254",
  http:response   "connection": "keep-alive",
  http:response   "server": "gunicorn/19.9.0",
  http:response   "access-control-allow-origin": "*",
  http:response   "access-control-allow-credentials": "true"
  http:response } +1ms
  http:response "{\n  \"args\": {}, \n  \"headers\": {\n    \"Host\": \"httpbin.org\", \n    \"User-Agent\": \"Artillery (https://artillery.io)\", \n    \"X-Amzn-Trace-Id\": \"Root=1-609a9293-031b2371069a353d0cbb4131\"\n  }, \n  \"origin\": \"213.76.55.123\", \n  \"url\": \"https://httpbin.org/get\"\n}\n" +1ms
Report @ 16:20:04(+0200) 2021-05-11 
like image 40
pbaranski Avatar answered Sep 26 '22 03:09

pbaranski