Skip to content

saucelabs-training/quickstart-appium-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Running Appium and Selenium Tests on Sauce Labs Platform

This project contains TestNG Java examples for two examples of tests that can be run on the Sauce Labs Cloud.

  • The first is an Android Appium test on a mobile browser, using the Swag Labs web app testing on an emulator on a Sauce Labs VM
  • The Second is an iOS Appium test run against the Swage Labs (React) mobile app testing on a Sauce Labs Real Device

Important information

Environment variables for Sauce Labs

The examples in this repository that can run on Sauce Labs use environment variables, make sure you've added the following

# For Sauce Labs Real devices in the New UI
export SAUCE_USERNAME=********
export SAUCE_ACCESS_KEY=*******

Demo app(s)

The Native demo app that has been used for the iOS test can be found here. Be aware of the fact that you need the build for the iOS real device. So please check the file you download.

The advice is to download the files to an apps folder in the root of this folder.

Upload apps to Sauce Storage

You can download the apps from here. Make sure you rename the app to:

  • iOS Real Devices: iOS-Real-Device-MyRNDemoApp.*.*.*-*.ipa => iOS-Real-Device-MyRNDemoApp.ipa

And manually upload them to the preferred Data Center, see this for the instructions.

Useful Links

Run Native App tests on Sauce Labs iOS real devices in the Sauce Labs Platform

If you want to run the Native iOS App tests on Sauce Labs real devices then you can run the iOS tests with

// If using the US DC
mvn clean install -DtestngXmlFile=appium_ios_rdc_app_test.xml -Dregion=us

// If using the EU DC
mvn clean install -DtestngXmlFile=appium_ios_rdc_app_test.xml -Dregion=eu

The tests will be executed on a any available iPhone, platform version 15 or 16.

Run Web App tests on Sauce Labs Android Emulators

If you want to run the Web App tests on Sauce Labs real Android devices then you can run the web tests with

// If using the US DC
mvn clean install -DtestngXmlFile=appium_android_emu_web_test.xml -Dregion=us

// If using the EU DC
mvn clean install -DtestngXmlFile=appium_android_emu_web_test.xml -Dregion=eu

The tests will be executed on Android Emulator, platform version 13.0.

About

Sample code for users to quickly run sample tests using appium to go along with the doc at https://docs.saucelabs.com/mobile-apps/automated-testing/appium

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages