Mobile app automation framework using appium-java bindings. 📱
Step 1: start appium server
Step 2: Start emulators
Step 3: Run tests
Run tests in parallel:
Approach no 1: Testng parallelism
Approach no 2: Appium grid and selenium grid
Combinations:
Android:
- Multiple emulators
- emulator + real devices
- Multiple devices
iOS:
- Multiple simulators
- simulator + real devices (Out of scope rite now)
- Multiple devices(Out of scope rite now)
Key points to note:
systemPort
The number of the port the UiAutomator2 server is listening on. By default, first free port from 8200..8299 range is selected. It is recommended to set this value if you are running parallel tests on the same machine.- URL of appium server session should have
wd/hub
- Parameter names from testng.xml should be same in method, if you are achieving parallelism from testng.xml
- providing path for
app
capability: fetch user.dir and combine user.dir with path of apk from content root to form absolute path. Relative path does not work here. - Capability type for emulators is
avd
we can also usedeviceName
as well.