I am doing research on how to load test a video streaming player using Locust, but haven't been able to make it work. Basically, I have a playback URL that loads a player and I can pass parameters to the player, including autoPlay=true
.
So, I tried to hit that playback URL passing the autoplay parameter, but that does not seem to be sufficient. If you are familiar with video streaming, the video is divided into chunks of usually 2 to 10 seconds; each chunk has a unique URI where the player fetches the next segment.
Is this something currently possible with Locust?
Here's my code for completness:
from locust import HttpUser, task, between
class GenerateViewers(HttpUser):
wait_time = between(1, 5)
@task
def index(self):
self.client.get("/")
Then I am able to open Locust UI and enter the parameters for my test, including the player URL. I assume what's happening is that Locust is hitting the URL I pass on the UI and immediately exiting (i.e., it just sends a GET request).