![Page 1: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/1.jpg)
http://elastest.io
User Impersonation as
a Service in End-to-End
Testing
Funded by the
European Union
Boni García
MODELSWARD Special Sessions (AMARETTO 2018)January 23rd 2018 | Funchal, Portugal
![Page 2: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/2.jpg)
Table of contents
1. Introduction
2. Background
3. ElasTest: platform for end-to-end testing
4. User Impersonation as a Service
5. Case study: testing WebRTC applications
6. Conclusions and future work
2
![Page 3: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/3.jpg)
1. Introduction
• Large distributed heterogenous systems are more and more common (e.g. microservices architectures, cloud native apps, etc.)
• Testing this kind of software is complex, especially to verify the system as a whole
3
End-to-end testinghappens at system
level with users impersonated
![Page 4: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/4.jpg)
Table of contents
1. Introduction
2. Background
3. ElasTest: platform for end-to-end testing
4. User Impersonation as a Service
5. Case study: testing WebRTC applications
6. Conclusions and future work
4
![Page 5: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/5.jpg)
2. Background
• Recent surveys confirm the existence of gap between the current and the desired status of test automation for distributed heterogeneous systems, prioritizing the relevance of test automation features for these systems (Lima, 2016)
5
25%
52%
7%
16%
WHAT IS THE LEVEL OF TEST AUTOMATION FOR DISTRIBUTED AND HETEROGENEOUS SYSTEMS?
Only manual testing
Automatic test execution (with manual test scripting/coding)
Automatic test generation (with manual execution)
Automatic test generation and execution
![Page 6: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/6.jpg)
2. Background
• The main mechanism used in the current state-of-the-art for the functional testing of web and mobile applications consists on impersonating a user through some kind of GUI automation
• Selenium is the most popular solution:
6
![Page 7: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/7.jpg)
Table of contents
1. Introduction
2. Background
3. ElasTest: platform for end-to-end testing
4. User Impersonation as a Service
5. Case study: testing WebRTC applications
6. Conclusions and future work
7
![Page 8: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/8.jpg)
3. ElasTest: platform for end-to-end testing
• ElasTest is an open source platform aimed to ease the end-to-end testing activities for different types of distributed applications and services
• ElasTest manages the full testing lifecycle, deploying and monitoring the SUT, executing the end-to-end tests and exposing the results to software engineers and testers
8
http://elastest.io/
![Page 9: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/9.jpg)
3. ElasTest: platform for end-to-end testing
• ElasTest architecture:
9
![Page 10: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/10.jpg)
Table of contents
1. Introduction
2. Background
3. ElasTest: platform for end-to-end testing
4. User Impersonation as a Service
5. Case study: testing WebRTC applications
6. Conclusions and future work
10
![Page 11: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/11.jpg)
4. User Impersonation as a Service
• ElasTest implements an user impersonation as a service capability that provides Software as a Service (SaaS) extending the W3C WebDriver with advanced capabilities:
1. Evaluation of the perceived Quality of Experience (QoE) of users on real-time multimedia applications
2. Equivalent automation capability for sensors and smart devices for Internet of Things (IoT)
11
![Page 12: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/12.jpg)
4. User Impersonation as a Service
• Extension to W3C WebDriver recommendation by ElasTest User Impersonation Service:
12
Method Path Description
POST /session/{sessionId}/element/{elementId}/event Subscribe to a given event within an element
GET /session/{sessionId}/event/{subscriptionId} Read the value of event for a given subscription
DELETE /session/{sessionId}/event/{subscriptionId} Remove a subscription
GET /session/{sessionId}/vnc Get remote session
DELETE /session/{sessionId}/vnc Delete remote session
POST /session/{sessionId}/usermedia Set user media for WebRTC
GET /session/{sessionId}/stats Read the WebRTC stats
POST /session/{sessionId}/element/{elementId}/latency Measure end-to-end latency of a WebRTC session
POST /session/{sessionId}/element/{elementId}/quality Measure quality of a WebRTC session
![Page 13: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/13.jpg)
Table of contents
1. Introduction
2. Background
3. ElasTest: platform for end-to-end testing
4. User Impersonation as a Service
5. Case study: testing WebRTC applications
6. Conclusions and future work
13
![Page 14: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/14.jpg)
5. Case study: testing WebRTC applications
• WebRTC is the umbrella term for a number of technologies aimed to bring Real Time Communications to the Web
• W3C (JavaScript APIs): getUserMedia, PeerConnection, DataChannels
• IETF (protocol stack): ICE, SDP, TURN, STUN, …
14
![Page 15: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/15.jpg)
5. Case study: testing WebRTC applications
• Our case study is based on OpenVidu, an open source videoconferencing WebRTC framework
• Question driving this study: “Is the ElasTest user impersonation service capable of improving the end-to-end testing process within the OpenViduproject?”
15
http://openvidu.io/
![Page 16: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/16.jpg)
5. Case study: testing WebRTC applications
• Demo
16
![Page 17: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/17.jpg)
Table of contents
1. Introduction
2. Background
3. ElasTest: platform for end-to-end testing
4. User Impersonation as a Service
5. Case study: testing WebRTC applications
6. Conclusions and future work
17
![Page 18: User Impersonation as a Service in End-to-End Testing](https://reader031.vdocument.in/reader031/viewer/2022030317/5a67226c7f8b9a117b8b46f3/html5/thumbnails/18.jpg)
6. Conclusions and future work
• ElasTest is an open source platform aimed to ease end-to-end tests for heterogenous large distributed systems
• ElasTest implements a User Impersonation as a Service (UIaaS) extending the W3C WebDriver recommendation
• Existing test codebases with Selenium and Appium are completely compatible with ElasTest
• Some features are still under development, such as measurement of the end-users’ perceived QoE or support for IoT devices
18