简体   繁体   English

使用 Locust 将数据输入到 UI 元素

[英]Inputting Data into UI element using Locust

so i'm pretty new to locust and load testing, but i need to insert specific values into different fields on my website.所以我对蝗虫和负载测试还很陌生,但我需要在我的网站上的不同字段中插入特定的值。 Trying to load test adding multiple items to an order using 50ish users.尝试使用 50 个用户加载测试将多个项目添加到订单中。 Hopefully each user having a different order in the end.希望每个用户最终都有不同的顺序。 Right now i have been able to log into my site and navigate between tabs, but thats it.现在我已经能够登录到我的网站并在选项卡之间导航,但就是这样。

Locust acts on HTTP protocol level, it doesn't "input" anything into "UI elements", it sends associated HTTP Requests , most probably it will be HTTP Post request containing field name and the value. Locust 作用于HTTP协议级别,它不会将任何内容“输入”到“UI 元素”中,它会发送相关的 HTTP 请求,很可能它将是Z293C9EA246FF9985DC6F62A650F7898Z 包含字段名称和值的 Post 请求

So basically it will be pretty much similar to the "login" but with different field names and values, you can capture the requests using your browser developer tools and then re-create them using Locust API or alternatively you can try Locust.Replay project which implements record and replay capability for Locust and it will generate some code for you.所以基本上它与“登录”非常相似,但具有不同的字段名称和值,您可以使用浏览器开发工具捕获请求,然后使用 Locust API 重新创建它们,或者您可以尝试使用 Locust.Replay项目为 Locust 实现记录和回放功能,它会为你生成一些代码。

More information: How to Run Locust with Different Users更多信息: 如何使用不同的用户运行 Locust

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM