我具有以下用于测试websocket的配置:
config:
target: "ws://localhost:6969/subscriptions"
phases:
- duration: 2
arrivalRate: 5
- duration: 2
arrivalRate: 5
rampTo: 4000
- duration: 2
arrivalRate: 50
ws:
# Ignore SSL certificate errors
# - useful in *development* with self-signed certs
rejectUnauthorized: false
scenarios:
- engine: "socketio"
flow:
- send: {"type":"connection_init","payload":{"headerFor":"AllTabs"}}
- send: {"id":"1","type":"start","payload":{"variables":{},"extensions":{},"operationName":null,"query":"subscription {\n hello_world {\n message\n }\n}\n"}}
- think: 200
- send: {"id":"1","type":"end"}
然后我运行artillery run hello.yml
,我可以看到xhr poll error
:
Elapsed time: 10 seconds
Scenarios launched: 1346
Scenarios completed: 0
...
Errors:
Error: xhr poll error: 1344
我从浏览器复制粘贴了我的两个 send 请求,因此它们很可能是正确的。如何查看此错误的完整输出?