Skip to content

This is Appium working with Samsung Andorid Phone for Dialer App vai SauceLabs cloud

Notifications You must be signed in to change notification settings

AtulKrSharma/AdroidAppium

Repository files navigation

Mobile testing w/ Appium + Java running on SauceLabs

Mobile automated testing using Appium and Java

🤳You will learn to 👇👇👇👇👇👇👇

  • What is Appium
  • Create an automated Android test
  • Find element locators using Appium Inspector
  • Run tests in Sauce Labs real devices

Setup


Sauce Labs setup

  1. Free Sauce account
  2. Make sure you know how to find your Sauce Labs Username and Access Key by going to the Sauce Labs user settings page

Appium setup

  1. We will run our automated tests on Sauce Labs devices; therefore, there is no need to install Appium Server.
  2. Please install appium inspector. Appium Inspector is basically just an Appium client (like WebdriverIO, Appium's Java client, etc...) with a user interface.

Demo App(s)

  1. The demo app that has been used for all these tests can be found here.
  2. Be aware of the fact that and iOS simulator uses a different build then a iOS real device. So please check the file you download.

In the browser address bar, add your GitHub url (https://github.com/USERNAME/this-repo-name)

  1. Once the URL is loaded, you will need to sign in with the GitHub account you created earlier
  2. Once the development environment is loaded, you should see 'Ready to test!' in the Terminal window in the lower portion of the window, run the following commands in that Terminal to set your SAUCE_USERNAME, SAUCE_ACCESS_KEY:
eval $(gp env -e SAUCE_USERNAME=<sauce_username>)
eval $(gp env -e SAUCE_ACCESS_KEY=<sauce_access_key>)

Replace <sauce_username>, <sauce_access_key> with your credentials

Once you have run those 2 commands, you can run the following commands to test your environment variables:

echo $SAUCE_USERNAME
echo $SAUCE_ACCESS_KEY

Run sanity tests

mvn clean test -DtestngXmlFile=myDemoTests.xml

Click here to see an example console output.
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running TestSuite
*** BeforeMethod hook. Running method demoTest ***
region is us
*** Start demoTest test ***
*** AfterMethod hook ***
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.488 s - in TestSuite
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.579 s
[INFO] Finished at: 2022-07-04T12:05:35+01:00
[INFO] ------------------------------------------------------------------------

# --- ### Local environment setup
  1. Sign up for a free GitHub account
  2. Fork this repository
  • Make sure you are logged into GitHub
  • Click the Fork in the upper right of the GitHub.
  • Give the repo a ⭐ while you're here 🤩
  1. Clone your fork of the repository to your machine. Must have Git installed

Setup environment variables on your system

Extra resources

About

This is Appium working with Samsung Andorid Phone for Dialer App vai SauceLabs cloud

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published