It's my first try at Locus, and unfortunately I don't know Python.
I'm trying a simple request to a valid https server, and I see this error:
SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
After some research I tried to add this:
import gevent
import geventhttpclient.connectionpool
geventhttpclient.connectionpool.SSLConnectionPool.default_options = {
"cert_reqs": gevent.ssl.CERT_NONE,
}
or this:
import requests
requests.packages.urllib3.disable_warnings() # disable SSL warnings
I run Locust as instructed:
docker-compose up --scale worker=4
How can I test https sites with Locust?
Thanks in advance
Regards
You can do turn the verification off by adding below method:
def on_start(self):
""" on_start is called when a Locust start before any task is scheduled """
self.client.verify = False
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With