This repository showcases automated testing of WebRTC-based web application on both Desktop and Mobile Browsers by executing the tests on Browserstack.
-
Clone the repository
-
Ensure you have the following dependencies installed on the machine
-
Java >= 8
-
Maven >= 3.1+
Maven:
mvn install -DskipTests
This repository showcases running of WebRTC based application on Browserstack on different browser combinations based on user selection as follows:
User Selection | Description |
---|---|
1 | Run WebRTC test on Google Chrome Browser |
2 | Run WebRTC test on Firefox Browser |
3 | Run WebRTC test on Edge Browser |
4 | Run WebRTC test on Safari Browser |
5 | Run WebRTC test on Chrome Browser for Android |
BrowserStack provides instant access to 3,000+ real mobile devices and browsers on a highly reliable cloud infrastructure that effortlessly scales as testing needs grow.
-
Create a new BrowserStack account or use an existing one.
-
Identify your BrowserStack username and access key from the BrowserStack Automate Dashboard and export them as environment variables using the below commands.
-
For *nix based and Mac machines:
export BROWSERSTACK_USERNAME=<browserstack-username> && export BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
-
For Windows:
-
For CMD:
set BROWSERSTACK_USERNAME=<browserstack-username> set BROWSERSTACK_ACCESS_KEY=<browserstack-access-key>
-
For Powershell(Setting Environment Variable Persistently):
[System.Environment]::SetEnvironmentVariable('BROWSERSTACK_USERNAME','<browserstack-username>') [System.Environment]::SetEnvironmentVariable('BROWSERSTACK_ACCESS_KEY','<browserstack-access-key>')
Alternatively, you can also hardcode USERNAME and ACCESS_KEY in the [ WebRTCConf.java]bstack-webrtc-media/(src/main/java/WebRTCConf.java) file.
-
- To run WebRTC test on Browserstack, open terminal/CMD/Powershell and type:
mvn exec:java
- You would be prompted to enter input(1,2,3,4,5) which would execute the WebRTC test on Browser combinations as mentioned here
- Login to Browserstack and you can see your tests successfully executed.