Appium Maven Plugin

A plugin to allow you to start and stop Appium as part of your Maven build.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.lazerycode.appium
ArtifactId

ArtifactId

appium-maven-plugin
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Appium Maven Plugin
A plugin to allow you to start and stop Appium as part of your Maven build.
Source Code Management

Source Code Management

https://github.com/Ardesco/appium-maven-plugin

Download appium-maven-plugin

How to add to project

<plugin>
    <groupId>com.lazerycode.appium</groupId>
    <artifactId>appium-maven-plugin</artifactId>
    <version>0.2.0</version>
</plugin>

Dependencies

compile (10)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.1.1
org.apache.maven : maven-core jar 3.1.1
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5
commons-io : commons-io jar 2.5
org.zeroturnaround : zt-exec jar 1.9
com.squareup.okhttp3 : okhttp jar 3.6.0
org.zeroturnaround : zt-process-killer jar 1.5
org.slf4j : slf4j-api jar 1.7.22
ch.qos.logback : logback-core jar 1.1.8
ch.qos.logback : logback-classic jar 1.1.8

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.hamcrest : java-hamcrest jar 2.0.0.0

Project Modules

There are no modules declared in this project.

#Appium Maven Plugin

Join the chat at https://gitter.im/jmeter-maven-plugin/jmeter-maven-plugin Build Status Maven Central Javadoc

A maven plugin for appium

#Basic Usage

Add the plugin to your project

  • Add the plugin to the build section of your pom's project :
<plugin>
    <groupId>com.lazerycode.appium</groupId>
    <artifactId>appium-maven-plugin</artifactId>
    <version>0.1.0</version>
    <configuration>
        <nodeDefaultLocation>${project.basedir}</nodeDefaultLocation>
        <appiumLocation>${project.basedir}</appiumLocation>
    </configuration>
    <executions>
        <execution>
            <id>start appium</id>
            <phase>pre-integration-test</phase>
            <goals>
                <goal>start</goal>
            </goals>
        </execution>
        <execution>
            <id>stop appium</id>
            <phase>post-integration-test</phase>
            <goals>
                <goal>stop</goal>
            </goals>
        </execution>
    </executions>
</plugin>
  • Use the frontend-maven-plugin to download node and appium
<plugin>
    <groupId>com.github.eirslett</groupId>
    <artifactId>frontend-maven-plugin</artifactId>
    <version>1.3</version>
    <configuration>
        <workingDirectory>src/test</workingDirectory>
    </configuration>
    <executions>
        <execution>
            <id>install node and npm</id>
            <phase>process-resources</phase>
            <goals>
                <goal>install-node-and-npm</goal>
            </goals>
            <configuration>
                <nodeVersion>v7.4.0</nodeVersion>
                <npmVersion>4.1.1</npmVersion>
            </configuration>
        </execution>
        <execution>
            <id>npm install</id>
            <phase>process-resources</phase>
            <goals>
                <goal>npm</goal>
            </goals>
            <configuration>
                <arguments>install</arguments>
            </configuration>
        </execution>
    </executions>
</plugin>

This will require a package.json:

{
  "name": "mobile-appium-tests",
  "private": true,
  "license": "",
  "version": "0.0.0",
  "description": "Download appium for automated tests",
  "devDependencies": {
    "appium": "1.6.5",
    "ios-deploy":"1.9.1"
  },
  "scripts": {
    "prestart": "npm install",
    "pretest": "npm install"
  }
}

Run the build

`mvn verify`

Now node and appium will be downloaded and appium will stop and start as part of your build.

Versions

Version
0.2.0
0.1.0