WebRTC Software Verification and Validation Methods

PhD student: Agil Yolchuyev Email: [email protected] What is WebRTC? 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, Freeswitch and 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: WebRTC and SIP Operation Architecture Existing WebRTC Client Demo Applications and Application Libraries u Sipml5 u JSSIP u Twilio u Crosswol u EasyRTC u OpenWebRTC 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: Testing Command Line Flags

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

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

Initialization Browsers and Arguments Unit Tes t in g

Get the network Statistics Unit Tes t in g

Main Testing Stage Example Result

Result as JSON Tes t Res u l t ( RTCStats) Verifying WebRTC Requirements for Device DetectRTC library to identify WebRTC features such as system having speakers, microphone or webcam, screen capturing is supported, number of 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!) } DetectRTC Example Tes t Web RT C Features Thank you!!!!

Questions?