Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which...

Preview:

Citation preview

WebRTC Software Verification and Validation Methods

PhD student: Agil Yolchuyev

Email: yolchuyev@hit.bme.hu

u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs.

u The main gateway which use for WebRTC technology is SIP servers (Asterisk, Freeswitchand etc.)

u Because WebRTC is Real-Time application the testing process is not same with traditional web testing methods like unit testing or integration testing

u Not all browsers still support Webrtc:

What is WebRTC?

WebRTC and SIP Operation Architecture

Demo Application

u Sipml5

u JSSIP u Twilio

u Crosswol

u EasyRTCu OpenWebRTC

Existing WebRTC Client

Applications and Libraries

Common functions of libraries

u getUserMedia(): capture audio and video.

u MediaRecorder: record audio and video.

u RTCPeerConnection: stream audio and video between users.

u RTCDataChannel: stream data between users.

Sipml5 WebRTC Application Architecture

Sipml5 Operation Steps

u Initialize the engine -> Call the Sip Stack Function. If error Show error message (SIPml.init)

u Create a SIP stack -> Initialize basic network parameters like display name, WebSocket proxy Url, Password, Authorization Name and others. With using function (SIPml.Stack)

u Register/login -> Check the user login parameters. If error return error message

u Making/receiving audio/video call -> If “sipStack.registerSession” function parameters was correct allow for making call (or receiving call). Make a call (sipStack.newSession), receive a call(sipStack.newSession.accept)

u Send/receive SIP MESSAGE -> If “sipStack.registerSession” function parameters was correct allow for sending message. The message must specified inside of the function like send message and receive message. Example:

u --allow-file-access-from-files allows getUserMedia() to be called from file:// URLs.

u --disable-gesture-requirement-for-media-playback removes the need to tap a <video> element to start it playing on Android.

u --use-fake-ui-for-media-stream avoids the need to grant camera/microphone permissions.

u --use-fake-device-for-media-stream feeds a test pattern to getUserMedia() instead of live camera input.

u --use-file-for-fake-video-capture=path/to/file.y4m feeds a Y4M test file to getUserMedia() instead of live camera input.

Testing Command Line Flags

u NPM (Node.js Package Manager) u WebdriverIOu Webdriverrtcu Seleniumu Wireshark

Sipml5 Testing Environment

u startAnalyzing() – This function use to to take stats of a specific RTCPeerConnection object you can use this function to return that object.

u getConnectionInformation(callback) – Returns basic information about connection

u getStats(duration) - Returns all stats within given duration in different formats

Unit Testing

Unit TestingInitialization Browsers and Arguments

Unit Testing Get the network Statistics

Unit Testing Main Testing Stage

Example ResultResult as JSON

Test Result (RTCStats)

DetectRTC library to identify WebRTC features such as system havingspeakers, microphone or webcam, screen capturing is supported, numberof audio/video device of the device.

How to use library ?

CDN URL = cdn.WebRTC-Experiment.com/DetectRTC.js”

DetectRTC.load(function() {

DetectRTC.hasWebcam (has webcam device!)

DetectRTC.hasMicrophone (has microphone device!)

DetectRTC.hasSpeakers (has speakers!)

}

Verifying WebRTC Requirements for Device

DetectRTC Example

Test WebRTC Features

Questions?

Thank you!!!!

Recommended