Appium test automation without the need to install Appium Server (Desktop). You also can start testing directly from your mobile phone.
Client Program -> Appium Server (PC) -> Appium UIAutomator Server (Android) -> Apps (Android)
Client Program -> Appium UIAutomator Server (Android) -> Apps (Android)
If you want to learn about appium goto this url appium.io. You also can find more detail about android apps used in this repo from here:
-
Connect mobile phone to PC via USB
-
Make sure USB debugging setting is enable
-
ADB added to environment variable path (open
command prompt
then typeadb version
, if output showing version then ADB is configured properly). Read this if you don't know what to do:https://www.xda-developers.com/install-adb-windows-macos-linux/
https://www.xda-developers.com/adb-fastboot-any-directory-windows-linux/
- Clone this repo (
git clone https://github.com/thiovan/simplified-appium
) - Run
install.bat
and wait until messageDone.
shown - Open browser and goto this url
http://localhost:6790/wd/hub/status
- Make sure response showing like this:
{
"sessionId": "None",
"value": {
"message": "UiAutomator2 Server is ready to accept commands",
"ready": true
}
}
If server not responding or response not match try run install.bat
once again
- Your mobile phone now ready for test automation. If you want run test automation without PC, just close all
command prompt
window and disconnect your mobile phone from USB
If get error: more than one device and emulator
, follow this step first
- Open
command prompt
and run this commandadb devices
- Open
install.bat
with text editor and replaceYOUR_DEVICE_SERIAL_HERE
with serial number from adb output, then save your changes - Run
install.bat
again
- Copy
play-store.py
fromexample
directory to your phone internal memory - Install termux (https://play.google.com/store/apps/details?id=com.termux)
- Open termux then run install python (
pkg install python
) - Run command
termux-setup-storage
- Run command
python ~/storage/shared/play-store.py
- Automation test will running
- Open
command prompt
then run this commandadb forward tcp:6790 tcp:6790
- Run command
python play-store.py
- Automation test will running
Notes: play-store.py
inside example
directory just sample, you could implement your own automation testing.
This is list available API in Appium UIAutomator server (notes: list still incomplete)
https://thiovan.github.io/simplified-appium/api-docs/
Parameters used in this API docs:
_.base_url => http://127.0.0.1:6790/wd/hub
_.session_id => hit session create API then you will retrieve sessionId (example: 02150934-8a1b-4233-b48c-d33c491fda79)
:element => hit find element API then you will retrieve ELEMENT (example: 51fad69d-895b-4c11-8381-7ed85b314824)
- Build simple interface software or mobile apps
- List all available API
- Add support for IOS apps
- Example for another programming language
- Find another alternative closing apps directly from phone when test automation ended
If you want to complete task in this todo list, feel free to ask pull request