Closed sirisha-potluri closed 4 years ago
Because the "execute" method runs in an infinite loop, you can't control the number of requests. Instead, you have control of thread-concurency and request per second(aka RPS).
If you really want to control the number of requests, try to keep a counter of requests and do nothing but sleeping in the "execute" method when the threshold exceeded.
BTW, performance testing using Selenium and WebDriver is generally not advised.
See aslo, https://www.selenium.dev/documentation/en/worst_practices/performance_testing/
Because the "execute" method runs in an infinite loop, you can't control the number of requests. Instead, you have control of thread-concurency and request per second(aka RPS).
If you really want to control the number of requests, try to keep a counter of requests and do nothing but sleeping in the "execute" method when the threshold exceeded.
Thanks for the quick response! We also have developed a prototype in python for firing selenium events. But in python, there seems to be no problem as The no. of users input on the locust UI spins up exactly the sam locustfile_python.TXT e count of browsers through selenium. How is it controlled in Python. Attaching the code for reference.
I'm exploring Locust for performance test our applications. Would like to reuse the existing Java page objects(selenium web elements) instead of rewriting in Python. Issue: I try to invoke a particular count of users, by entering in the textbox "Number of total users to simulate" (on the locust ui) but actually runs into an infinite loop spawning users forever.
Thanks, Sirisha