Be the first user to complete this post

  • 0
Add to List

Automated testing of webcam / video feeds in webRTC application

Testing webRTC based application, consistently automated fashion is a challenging problem. Mainly due to the real time nature of the application including the media streams related features like the audio, video and screensharing. There are useful flags in which browser vendors provide to make life easier. Here, we will look at the flags related to webcam sharing.

Physical webcam


Fake webcam

To test the web camera streams without using an actual camera, chrome provides few useful flags. The easiest one is the following : use-fake-device-for-media-stream

Fake webcam preview

I call the green packman with counter


  • Allows only a single fake webcam stream. Hence, can not test mutiple webcam streams using this approach.

Automate the local y4m video files via automation

You can use the following chrome flags to feed the local video file in the video feed.
You can use this flag to verify the content of the webcam feed. For example, sender can share a video showing the barcode and on the receiver can verify the content of the barcode using library such as zxing.

Further reading

Also Read:

  1. How to return a value from a jasmine spy
  2. Chromium flag to by pass popup to grant desktop sharing in WebRTC app
  3. Testing promise sequence using mocha, chai, chai-as-promised, sinon
  4. Run a single test in jasmine