Skip to content

schwarcu/appium-parallel-execution

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Appium parallel test execution Here you'll find out how to execute tests in parallel using Appium and TestNG.

What you need

  1. Java JDK (with JAVA_HOME and PATH configured)
  2. IDE (and import this project using Maven)
  3. Android SDK (for Android execution | with ANDROID_HOME and PATH configured)
  4. Android AVD created (or Genymotion)
  5. XCode and an iPhone Simulator (for iOS execution)
  6. Appium installed through npm

About the apps

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.

Android

Configurations

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

Inspect elements on Android

You can use the uiautomatorviewer to inspect elements on Android devices. or you can use Appium Desktop

iOS

Configurations

To execute the examples over the iOS platform you'l need:

Inspect elementos on iOS

You also can use Appium Desktop or you can use the Macaca App Inspector

Execution

On a MacOs machine give write access to node_modules: sudo chmod -R 777 /usr/local/lib/node_modules

Appium

Try to always have Appium and libraries updated.

Project execution

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.

About the test

On the package com.eliasnogueira you'l find the test script TipTest.java_ that uses the information on config.properties and suite.xmlto execute the tests in Android or iOS

Have trouble?

CapabilityNotPresentOnTheGridException

Please, read this post: https://medium.com/@eliasnogueira/got-capabilitynotpresentonthegridexception-66cbc1aa06b7

Any question, error or feedback?

Please fill an issue ;-)

About

Example of paralled execution using Appium and Selenium Grid

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 93.5%
  • Shell 6.5%