Mobile automated testing using Appium and Java
- Create an automated iOS test
- Run test in Sauce Labs
- Set test name
- Report results to Sauce Labs
- Upload an app to Sauce Storage
- Create an automated Android test
- Run tests in parallel
- 🔭 I’m the founder of Ultimate QA
- 🏢 I’m a Sr Solutions Architect at Sauce Labs
- 🌱 I’m currently working on Sauce Bindings
- 💬 Ask me about environmentalism, veganism, test automation, and fitness
- 😄 Pronouns: he/him
- ⚡ Fun fact: I'm a Ukranian, Russian, Jew that was born in Uzbekistan and raised in US 🤯
- 📫 Follow me for testing and dev training
ℹ Gitpod lets you run an entire Dev environment from a browser! You can use this approach if you don't know how to setup a local Java environment.
- Sign up for a free GitHub account
- 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 🤩
-
In the browser address bar, your GitHub url (
https://github.com/USERNAME/this-repo-name
) withhttps://gitpod.io/#
-
The resulting url should look as follows:
https://gitpod.io/#https://github.com/USERNAME/mobile-appium-java
-
-
Once the Gitpod.io URL is loaded, you will need to sign in with the GitHub account you created earlier
-
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
:
ℹ️ You can get your Sauce Labs Username and Access Key by going to the Sauce Labs user settings page
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 3 commands, you can run the following commands to test your environment variables:
echo $SAUCE_USERNAME
echo $SAUCE_ACCESS_KEY
Run sanity tests
mvn test -Dtest="IOSTest" -X
Click here to see an example console output.
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 35.863 s
✅👏Environment setup is complete if tests passed
- Sign up for a free GitHub account
- 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 🤩
- Clone your fork of the repository to your machine. Must have Git installed
git clone URL_OF_YOUR_FORK
Setup environment variables on your system
Run sanity tests
mvn test -Dtest="IOSTest" -X
Click here to see an example console output.
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 54.305 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.063 s
[INFO] Finished at: 2021-11-03T16:03:20-04:00
[INFO] ------------------------------------------------------------------------