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.
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.
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 ...
Was running this from a powershell console. Dropped down to good old CMD and it works as documented.
Tested on Windows in Git Bash terminal.
export DEBUG=http,http:capture,http:response
Testing:
echo $DEBUG
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
artillery quick -c 1 -n 1 https://httpbin.org/get
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With