我是 python 和 locust 的新手,试图运行我的第一个 locust perf 脚本来测试 API 但是,我收到以下代码的错误 ssl.SSLError: [SSL] PEM lib (_ssl.c:4065)。
class MyHttpTest(HttpUser):
wait_time = constant(5)
host = "https://abc.myorg.net"
headers = {
'Content-Type': "application/json",
'Ocp-Apim-Trace': "true",
'Ocp-Apim-Subscription-Key': "<APIM subscription Key>",
'Cache-Control': "no-cache"
}
payload = "{\n\t\"name\": \"abc\"\n}"
@task
def get_status(self):
self.client.headers = self.headers
self.client.verify = False
self.client.post("/uam/Link/Get/v1", data=self.payload,
cert=("<path to pfx certificate>",
"<password of pfx certificate"))