【问题标题】:How to share cookie for all request for an user in locust?如何为蝗虫中的用户共享所有请求的cookie?
【发布时间】:2021-03-11 04:19:01
【问题描述】:

我想为用户的所有请求共享 _profiler cookie,无论如何要在 locust 中执行此操作?

 self.client.post(
    "/customer/account/loginPost/bind/no/",
    headers = headers, 
    data = {
        'login[username]': email, 
        'login[password]': password, 
        'form_key': form_key
    },
    cookies={
        '_profiler': True
    }
)

//Another request in another task, I hope the `_profiler` cookies exists here.
self.client.get('/customer/section/load?sections=cart&force_new_section_timestamp=false',headers=headers)

【问题讨论】:

    标签: locust


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 2019-04-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多