加载测试socket.io与artillery.io聊天并验证JSON响应

时间:2017-08-09 06:56:55

标签: node.js socket.io performance-testing load-testing

伙计们,我使用以下代码来加载测试我的基于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"}

0 个答案:

没有答案