##Appium parallel test execution Here you'll find out how to execute tests in parallel using Appium and TestNG.
- Java JDK (with JAVA_HOME and PATH configured)
- IDE (and import this project using Maven)
- Android SDK (for Android execution | with ANDROID_HOME and PATH configured)
- Android AVD created (or Genymotion)
- XCode and an iPhone Simulator (for iOS execution)
- Appium installed through npm
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.
To execute the examples over the Android platform you'll need:
- Android SDK
- Updated Build Tools, Platform Tools and, at least, one System Image (Android Version)
- Configure Android Path on your environment variables
- ANDROID_HOME: root android sdk directory
- PATH: ANDROID_HOME + the following paths = platform-tools, tools, tools/bin
- And Android Virtual Device
- AVD or Genymotion
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'l need:
- MacOS machine :-)
- Xcode installed
- iPhone simulator (I recommend, for these tests iOS version > 10)
- Follow all the steps on https://github.com/appium/appium-xcuitest-driver
You also can use Appium Desktop or you can use the Macaca App Inspector
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.
- Verify the core Appium version on npm appium site. To see your Appium version run
appium --version
on Terminal - Verify the Appium library version on https://github.com/appium/java-client
- If it differ from pom.xml file, update it!
First you'll need to start the hub and the nodes.
There is a file in executor folder called launch_grid.sh
. This file open the hub (selenium server) and the nodes.
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:
- platform
- udid
- platformVersion
This parameters are linked to the test files using TestNG, so when you execute the suite.xml file all these parameter will be used on test file.
On the package com.eliasnogueira you'l 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 ;-)