These days, it’s hard to imagine communication media without using audio and video content. Moreover, all significant events are broadcast in live mode for a wide audience all over the world. Since this audience is constantly growing, it’s really important for content providers to be aware of the quality of their media stream delivery and know the breaking point of their streaming services. To make sure a streaming service can handle an expected audience, it’s a good idea to simulate a number of users accessing the media stream.
Load Testing Approaches
There are multiple ways that audio or video content can be delivered. Users can stream media in a web browser using any number of online media streaming services, such as YouTube or Netflix. On the other hand, media streams can be accessed via static URLs in a browser or in the media players that support network connection and external links, for example, the VLC media player. Therefore, the right load testing approach should be chosen to set up a load test correctly. In this article, we will focus on two main approaches for testing audio and video streaming service performance and scalability using LoadView:
- Streaming media load testing using an actual media resource path.
- Real browser-based load testing.
Load Testing of Static, Link-based Streaming Media
Access to a stream source can be provided by a static RTP link to the media file. For example, the media source can be linked directly from the HTML, similar to the images on a web page. Generally, one can play a static stream in any browser that supports the corresponding codecs, or by a compatible online or desktop media player, such as Windows Media Player or VLC.
Example of static RTP links:
If you have a static RTP link to the media source file or playlist, it is recommended to set up a Streaming Media load test. LoadView will hit the static URL with a number of concurrent users trying to download the first 30 seconds of the stream. If the source server is unavailable, or the system failed to download the stream playback, an error will be generated.
Real Browser-based Load Testing
Sometimes, a media file URL is not available publicly. For example, a media stream application can require authentication to play the stream. Since the stream URL is available for only logged in users, it will be refreshed every time when the authentication token expires. In terms of load testing, it means that you need to provide the user credentials to access the media stream file on each load test session.
At the same time, many media content providers use plugins or embedded native video players (e.g., proprietary YouTube player) to stream audio and video content. In this case, the link to the streaming source is not available directly from the page HTML.
In the cases when a static RTP link to a media source is not available, opt for web application UI testing in a real browser. For these purposes, LoadView provides the EveryStep Web Recorder to capture the video of media streaming in the browser window.
To create the load test, select the Web Applications load testing type and record the script:
- In the Everystep Web Recorder, navigate to the web page that contains a streaming media and select the play button to start streaming.
- Stop recording and click OK in the pop-up to skip playing the script.
- Go to the Script Code section in the Everystep Web Recorder, and right-click the last script line.
- From the inline menu, select Delay and set up the delay in the end of the script. The system will wait for the streaming playback during the specified time duration on a test run.
- Save the script and proceed with the load test scenario configuration.
Once the load test has started, browse and review the media stream page. This approach allows you to catch any quality losses in audio or video under applied load as they appear for real users in real-time.