Search code examples
javascriptk6

Can I create K6 load test for the video stream


My project has pages with videos added from youtube. Can I do simulation using k6 that virtual users see those videos?


Solution

  • I have to ask, what is your end goal here? Generally speaking there is rarely a good reason to test a third party resource. You have no way to control their performance/fix issues and it typically violates TOS to do so. In short, if you aren't google, why would you load test YouTube? Load and performance testing should be focused on systems you control.

    That said - testing of streaming video is possible with k6, if transported over HTTP(s). You would need to inspect how the content is delivered and the mechanism in place to to get the next part of the video stream. It would require some deal of scripting to get working, but is possible. To be clear, there is no player launched, so it would just be the underlying data that is loaded.