2 years ago

#64872

test-img

AKSHAY NAIR

Can we capture the value of a cookie from API response in Artillery.io

I am trying to capture a cookie value from a API response but the user is failing after running the command.

config:
  target: "URL"
  phases:
    - duration: 100
      arrivalRate: 10

scenarios:
  - name: "Login and fetch the token"
    flow:
      - log: "Login and Fetching the token"
      - post:
          url: "/api/v1/login/"
          json:
            username: "username"
            password: "password"
          capture:
            - cookie: "csrftoken"
              as: fooBody
      - log: "{{ fooBody }}"

yaml

artillery

0 Answers

Your Answer

Accepted video resources