Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/atulkrsharma/adroidappium

This is Appium working with Samsung Andorid Phone for Dialer App vai SauceLabs cloud
https://github.com/atulkrsharma/adroidappium

android appium mobile saucelabs

Last synced: 11 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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](https://saucelabs.com/sign-up)
2. Make sure you know how to find your Sauce Labs Username and Access Key by going to the [Sauce Labs user settings page](https://app.saucelabs.com/user-settings)

---
### 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](https://github.com/appium/appium-inspector#installation). 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](https://github.com/saucelabs/sample-app-mobile/releases).
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`)

3. Once the URL is loaded, you will need to sign in with the GitHub account you created earlier
4. 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`:

```bash
eval $(gp env -e SAUCE_USERNAME=)
eval $(gp env -e SAUCE_ACCESS_KEY=)
```

> Replace , with your credentials

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

```bash
echo $SAUCE_USERNAME
echo $SAUCE_ACCESS_KEY
```

Run sanity tests

```bash
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](https://github.com/)
2. [Fork this repository](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
* 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 🤩
3. Clone **your fork** of the repository to your machine. Must have [Git installed](https://git-scm.com/downloads)

Setup environment variables on your system
* [Windows](https://docs.saucelabs.com/basics/environment-variables/#setting-up-environment-variables-on-windows-systems)

## Extra resources

- [Appium options for sauce](https://docs.saucelabs.com/dev/test-configuration-options/#mobile-app-appium-capabilities-required)
- [All appium capabilities](https://appium.io/docs/en/writing-running-appium/caps/)
- [More Appium resources](https://github.com/saucelabs-training/demo-java/blob/main/TRAINING.md)