如何修复炮兵样本脚本中的xHR Poll错误

时间:2019-05-29 11:56:47

标签: artillery

我正在尝试执行以下方案。但是我收到xHR poll错误,并且脚本在无限循环中运行。我无法找出实际原因

我还添加了

  socketio: 
   transports: [ "websocket" ] 

如其中一个论坛中所建议,但是存在相同的问题。

这是脚本:

config:
  target: 'https://reqres.in'
  socketio: 
   transports: [ "websocket" ]
  phases:
    - duration: 60
      arrivalRate: 10
      rampTo: 20
  payload:
    path: "./data.csv"
    fields:
      - "id"
      - "name"
      - "job"
scenarios:
 - name: "Our First"
   weight: 1
   engine: "socketio"
   flow:
    - post:
        url: "/api/users/{{ id }}"
    - emit:
          channel: "Add id" 
          data: "{{ id }}"
    - think: 5
    - emit:
         channel: "Add Job"
         data: "{{ job }}"
    - think: 2

0 个答案:

没有答案