![Page 1: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/1.jpg)
WebRTC Software Verification and Validation Methods
PhD student: Agil Yolchuyev
Email: [email protected]
![Page 2: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/2.jpg)
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?
![Page 3: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/3.jpg)
WebRTC and SIP Operation Architecture
![Page 4: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/4.jpg)
Demo Application
u Sipml5
u JSSIP u Twilio
u Crosswol
u EasyRTCu OpenWebRTC
Existing WebRTC Client
Applications and Libraries
![Page 5: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/5.jpg)
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.
![Page 6: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/6.jpg)
Sipml5 WebRTC Application Architecture
![Page 7: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/7.jpg)
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:
![Page 8: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/8.jpg)
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
![Page 9: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/9.jpg)
u NPM (Node.js Package Manager) u WebdriverIOu Webdriverrtcu Seleniumu Wireshark
Sipml5 Testing Environment
![Page 10: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/10.jpg)
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
![Page 11: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/11.jpg)
Unit TestingInitialization Browsers and Arguments
![Page 12: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/12.jpg)
Unit Testing Get the network Statistics
![Page 13: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/13.jpg)
Unit Testing Main Testing Stage
![Page 14: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/14.jpg)
Example ResultResult as JSON
![Page 15: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/15.jpg)
Test Result (RTCStats)
![Page 16: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/16.jpg)
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
![Page 17: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/17.jpg)
DetectRTC Example
![Page 18: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/18.jpg)
Test WebRTC Features
![Page 19: Webrtc Software verification and validation methods · u WebRTC is a collection of protocols which provides browsers and mobile applications with Real-Time Communications (RTC) capabilities](https://reader034.vdocuments.mx/reader034/viewer/2022042215/5ebd0d397f74ea321a5b1d12/html5/thumbnails/19.jpg)
Questions?
Thank you!!!!