伙计们,我使用以下代码来加载测试我的基于socket.io的聊天应用程序。我从聊天中发送的回复是JSON格式。但我无法使用artillery.io交叉验证。我在错误中收到“数据无效:1”。如何在artillery.io socket.io测试中验证JSON响应?
target: "http://127.0.0.1:9092"
environments:
debug:
phases:
-
duration: 1
arrivalRate: 1
scenarios:
-
engine: "socketio"
flow:
-
emit:
channel: "chatevent"
data: {"userName": "jj", "message": "hello","displayName":"John"}
response:
channel: "chatevent"
data: {"userName": "jk", "message": "world","displayName":"Jack"}