项目作者: Ardesco

项目描述 :
A maven plugin for appium
高级语言: Java
项目地址: git://github.com/Ardesco/appium-maven-plugin.git
创建时间: 2017-01-30T19:20:25Z
项目社区:https://github.com/Ardesco/appium-maven-plugin

开源协议:Apache License 2.0

下载


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 :
  1. <plugin>
  2. <groupId>com.lazerycode.appium</groupId>
  3. <artifactId>appium-maven-plugin</artifactId>
  4. <version>0.1.0</version>
  5. <configuration>
  6. <nodeDefaultLocation>${project.basedir}</nodeDefaultLocation>
  7. <appiumLocation>${project.basedir}</appiumLocation>
  8. </configuration>
  9. <executions>
  10. <execution>
  11. <id>start appium</id>
  12. <phase>pre-integration-test</phase>
  13. <goals>
  14. <goal>start</goal>
  15. </goals>
  16. </execution>
  17. <execution>
  18. <id>stop appium</id>
  19. <phase>post-integration-test</phase>
  20. <goals>
  21. <goal>stop</goal>
  22. </goals>
  23. </execution>
  24. </executions>
  25. </plugin>
  • Use the frontend-maven-plugin to download node and appium
  1. <plugin>
  2. <groupId>com.github.eirslett</groupId>
  3. <artifactId>frontend-maven-plugin</artifactId>
  4. <version>1.3</version>
  5. <configuration>
  6. <workingDirectory>src/test</workingDirectory>
  7. </configuration>
  8. <executions>
  9. <execution>
  10. <id>install node and npm</id>
  11. <phase>process-resources</phase>
  12. <goals>
  13. <goal>install-node-and-npm</goal>
  14. </goals>
  15. <configuration>
  16. <nodeVersion>v7.4.0</nodeVersion>
  17. <npmVersion>4.1.1</npmVersion>
  18. </configuration>
  19. </execution>
  20. <execution>
  21. <id>npm install</id>
  22. <phase>process-resources</phase>
  23. <goals>
  24. <goal>npm</goal>
  25. </goals>
  26. <configuration>
  27. <arguments>install</arguments>
  28. </configuration>
  29. </execution>
  30. </executions>
  31. </plugin>

This will require a package.json:

  1. {
  2. "name": "mobile-appium-tests",
  3. "private": true,
  4. "license": "",
  5. "version": "0.0.0",
  6. "description": "Download appium for automated tests",
  7. "devDependencies": {
  8. "appium": "1.6.5",
  9. "ios-deploy":"1.9.1"
  10. },
  11. "scripts": {
  12. "prestart": "npm install",
  13. "pretest": "npm install"
  14. }
  15. }

Run the build

  1. `mvn verify`

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