Arillery.io无法继续以302状态运行

时间:2019-03-25 18:36:19

标签: node.js artillery

我有一个登录后重定向的页面。我希望大炮在登录后继续执行流程,但在获取302状态代码后似乎停止了。我想知道如何规避这一点。这是我的配置文件:

config:
  # plugins:
  #   expect: {}
  target: "http://localhost"
  processor: "./helpers.js"
  payload:
    path: "users.csv"
    fields:
      - "email"
      - "password"
  phases:
    - duration: 10
      arrivalRate: 10
scenarios:
  - name: "Login"
    flow:
      - get:
          url: "/login"
      - post:
          url: "/login"
          form:
            email: "{{ email }}"
            password: "{{ password }}"
          capture:
            header: "Location"
            transform: "this.split('/?jwt=')[1]"
            as: "jwt"
          followRedirect: false
          # afterResponse: "continueOn302"
          # expect:
          #   - statusCode: 302
      - log: "jwt: {{ jwt }}"
      - get:
          url: "/api/assignments"
          capture:
            json: "$.id"
            as: "id"
          headers:
            Authorization: "Bearer {{ jwt }}"
      - think: 15
      - post:
          url: "/api/assignments/{{ id }}"
          json:
            answer: "['foo', 'bar', 'baz']"
          headers:

0 个答案:

没有答案