Coder Social home page Coder Social logo

sauceappiumsample's Introduction

Running Appium and Selenium Tests on Sauce Labs Platform

This project contains Java examples for running Appium tests on Sauce Labs platform:
On Real Devices:

On Simulators and Emulators:

On Virtual Machine (VM):

The framework uses testNG xml file for parallel executions. All the tests in the same class will run in parallel on different devices

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 all these tests 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

  • If you want to use iOS real devices and Android real devices in the New Sauce Labs UI you need to upload the apps to the Sauce Storage. For more information on this step please visit: Application Storage.
  • In the app capability you must use storage:<app-id> or storage:filename=<file-name>. For more information on this step please visit: Application Storage.
  • Change the value of appName in the native apps tests for Android and iOS according to your app name.

Useful Links

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

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

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

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

The tests will be executed on an any available Samsung device.

NOTE: Make sure you are in the folder SauceAppiumSample when you execute this command

Run Web App tests on Sauce Labs Android real devices in the Sauce Labs Platform

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_rdc_web_test.xml -Dregion=us

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

The tests will be executed on any available Samsung device.

NOTE: Make sure you are in the folder SauceAppiumSample when you execute this command

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 iPhone 8.

NOTE: Make sure you are in the folder SauceAppiumSample when you execute this command

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

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

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

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

The tests will be executed on a iPhone 8.

NOTE: Make sure you are in the folder SauceAppiumSample when you execute this command

Run Native App tests on Sauce Labs Android Emulators

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

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

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

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

NOTE: Make sure you are in the folder SauceAppiumSample when you execute this command

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 8.0.

NOTE: Make sure you are in the folder SauceAppiumSample when you execute this command

Run Native App tests on Sauce Labs iOS Simulators

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

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

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

The tests will be executed on a iPhone 8 Simulator.

NOTE: Make sure you are in the folder SauceAppiumSample when you execute this command

Run Web App tests on Sauce Labs iOS Simulators

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

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

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

The tests will be executed on a iPhone 8 Simulator.

NOTE: Make sure you are in the folder SauceAppiumSample when you execute this command

Run Browser On Sauce Virtual Machine

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

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

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

The tests will be executed on Windows 10, latest version of Chrome.

NOTE: Make sure you are in the folder SauceAppiumSample when you execute this command

sauceappiumsample's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.