Web application real time video detection with Sikuli

Asked by Sthuthi

Hello,

I have an application (WEbRTC application) which uses cameras to capture the video. And I need to automate the test steps.

My test steps are:
1. Go to server URL
2. input the camera ID
3. click view button
4. Verify if video is streaming without any issue. (just verify if video is playing successfully or not)

Please somebody help me to automate this. :(
I want to use python + binding with selenium/sikuli to do this. Headless browser is great. Otherwise also fine.
( Since video is the real time streaming, I cannot capture screenshots and compare during test run. )

Please somebody provide me some code to automate these and verify if video is streaming or not at the earliest!

This would be great help. <email address hidden> <-- emailing the solutions also works.

Thanks,
Sthuthi

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cisum4 (deshpande-sa) said :
#1

This is an interesting problem to automate. One way to check if the video is playing is if its not showing a blank image - (All same color at multiple time instances). So basically, you use Sikuli to assert that a blank image is not being displayed - if it is then fail the test , otherwise pass it.

However, with this one cannot be sure if the image is indeed streaming correctly, only that it is streaming something. Another aspect to consider is audio streaming (is the audio streaming and if so its streaming quality etc.)

There are a few articles on the web on how to do Web RTC , but a bit technical:

https://blog.andyet.com/2014/09/29/testing-webrtc-applications

http://googletesting.blogspot.se/2014/08/chrome-firefox-webrtc-interop-test-pt-1.html

Good luck with your testing!

Revision history for this message
RaiMan (raimund-hocke) said :
#2

another option might be:

winVideo = <area> # somehow get the area, the video should be seen

isRunning = True

def running(event):
    global isRunning
    print "is running"
    isRunning = True
    event.stopObserver()

winVideo.onChange(running)

while isRunning:
    winVideo.observe(5) # see comment #1
    wait(1) # pause before restart observe

print "no changes in video display anymore"

the idea is: as long as the video is playing from time to time will change something in the display area

comment #1: this is the maximum time, that nothing changes, but the video is still running (e.g. a video containing still images).

... only an idea ;-)

Can you help with this problem?

Provide an answer of your own, or ask Sthuthi for more information if necessary.

To post a message you must log in.