美文网首页
python性能测试工具Locust (探坑)

python性能测试工具Locust (探坑)

作者: Nikon937 | 来源:发表于2021-05-06 18:17 被阅读0次

    问题一、

    执行请求时,warning警告:

    InsecureRequestWarning: Unverified HTTPS request is being made to host 'www.cnblogs.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
      warnings.warn(
    ![image.png](https://img.haomeiwen.com/i4899983/0a67dc27143942a5.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
    

    解决方案:

    import urllib3
    import requests  # 导入requests
    urllib3.disable_warnings()
    session = requests.session()
    # SSL证书验证的方法:加参数:verify=证书路径,或verify=False 不验证ssl 默认为True
    

    相关文章

      网友评论

          本文标题:python性能测试工具Locust (探坑)

          本文链接:https://www.haomeiwen.com/subject/xliddltx.html