使用蝗虫httpsession可以将catch_response默认为true
我们最终在几乎每个请求上都设置了Catch_Response = true。是否存在将此设置默认为true而不是false的配置或另一种方式?
We end up setting catch_response = True on almost every request we make. Is there a configuration or another way of defaulting this setting to true instead of false?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的!您可以覆盖该方法,类似于它在Reltuser中的完成方式( https://github.com/svenskaspel/locust-plugins/blob/master/locust_plugins/rest.py.py )
此方法所做的不仅仅是设置
cate> catch_response = true ,直接在用户上,而不是在会话上,但应该让您开始:
Yes! You can override the method, similar to how it is done in RestUser (https://github.com/SvenskaSpel/locust-plugins/blob/master/locust_plugins/users/rest.py)
This method does a little more than just set
catch_response=True
, and is directly on the User instead of on the session but is should get you started: