Git Product home page Git Product logo

appium-parallel-execution's Introduction

##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 ;-)

appium-parallel-execution's People

Contributors

eliasnogueira avatar

Watchers

James Cloos avatar Abhijeet more avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.