A lean, up-to-date, and cross-platform solution to run your mobile tests into a Selenium Grid using Appium.
A lean, up-to-date, and cross-platform solution to run your mobile tests into a Selenium Grid using Appium.
You can use this repo as a start point to implement your own cross-platform parallel execution in a grid. It uses different libraries and design pater to make it lean, easy to maintain and extend.
This section will show to you the libraries, frameworks and design decisions that made a lean architecture possible.
This project using the following languages and frameworks:
We know that any automation project starting with a good test architecture. This project can be your initial test architecture for a faster start. You will see the following items in this architecture:
JAVA_HOME
and PATH
configured)ANDROID_HOME
and PATH
configured)To execute the examples over the Android platform you'll need:
You can use the uiautomatorviewer to inspect elements on Android devices. or you can use Appium Desktop
To execute the examples over the iOS platform you'll need:
You also can use Appium Desktop or you can use the Macaca App Inspector
The Fastip app can be downloaded by this repository https://github.com/ptraeg/mobile-apps-4-ways
I have built the apps for Android and iOS platform, and these are located in app folder.
On a MacOs machine give write access to node_modules:
sudo chmod -R 777 /usr/local/lib/node_modules
Try to always have Appium and libraries updated.
appium --version
on the Terminal/Command Promptpom.xml
file, update it!First you'll need to start the hub and the nodes. Please read the Start commands to lear now to start it.
Each node is configured through a json file in json folder.
Remember you gonna need to change some values, like browserName
, version
, platform
, url
, host
, port
, hubPort
and hubHost
.
The port information is also linked on launch_grid.sh
file, that pass this and other informations by parameter.
After change all this information for your execution, execute the suite.xml file. Each test have 3 parameters:
These parameters are linked to the test files using TestNG, so when you execute the suite.xml file all these parameters will be used on test file.
On the package com.eliasnogueira
you'll find the test script TipTest.java
that uses the information on config.properties
and suite.xml
to execute the tests in Android or iOS
Please, read this post: https://medium.com/@eliasnogueira/got-capabilitynotpresentonthegridexception-66cbc1aa06b7
Please fill an issue