蝗虫给予“ httperror(404客户端错误:未找到url:
我有一个React Web应用程序,我想在这2个URL上使用蝗虫对其进行负载测试。 (主页&隐私政策页面)。对于主页,它可以正常工作,但是对于隐私页面,它给出了“ httperror('404客户端错误:找不到网址:https:// xxx/privacy-policy/')”错误。当我在浏览器上击中这些URL时,既可以打开&没有任何错误。为什么蝗虫给出这个错误。
这是我的代码 -
import time
from locust import HttpUser, task, constant
class CreateLead(HttpUser):
host = "https://xxx"
wait_time = constant(0)
@task
def loadtest(self):
self.client.get("/")
time.sleep(1)
self.client.get("/privacy-policy")
time.sleep(1)
I have a react web application, i want to do load testing on it using locust, on these 2 URL. (Homepage & Privacy Policy page). for homepage, it is working but for privacy page, it is giving "HTTPError('404 Client Error: Not Found for url: https://xxx/privacy-policy/') " error. when I am hitting these URL on browser both URL open & not giving any error. Why Locust giving this error.
this is my code -
import time
from locust import HttpUser, task, constant
class CreateLead(HttpUser):
host = "https://xxx"
wait_time = constant(0)
@task
def loadtest(self):
self.client.get("/")
time.sleep(1)
self.client.get("/privacy-policy")
time.sleep(1)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论