码迷,mamicode.com
首页 > 移动开发 > 详细

Appium TestNg Maven Android Eclipse java自动化环境搭建

时间:2019-04-11 17:49:21      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:下载   ppi   repo   准备   完成后   14.3   https   maven   构建   

1、环境准备 
1)Eclipse + maven + appium + TestNg 
确保已经在Eclipse 上面安装maven TestNg的插件

2)打开Eclipse,新建一个maven项目

2、配置依赖包,Appium需要三个包:appium client、selenium client、selenium server,如果我们不用maven构建工程,那么我们需要去下载这三个包,然后添加到我们的工程中,而maven不需要了,只需要配置依赖关系就可以了,我们可以在maven仓库中搜索我们需要的包,把他们的依赖关系写到pom.xml文件中:

maven仓库地址:http://mvnrepository.com/,例如搜索appium,就可以搜索到appium java client的包,选择最新的包,把依赖关系粘贴打pom.xml中,selenium client和selenium server只需要配置一个selenium依赖就行了,配置后的pom.xml文件如下:

<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.13.0</version>
<scope>compile</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>6.1.0</version>
</dependency>

 

配置后保存,会自动更新依赖包,如果没有更新也可以在右键选中工程,选择Maven-Update Project,进行更新。更新完成后,你就发现你的Maven Dependencies多了很多jar包

Appium TestNg Maven Android Eclipse java自动化环境搭建

标签:下载   ppi   repo   准备   完成后   14.3   https   maven   构建   

原文地址:https://www.cnblogs.com/xiaomifeng0510/p/10691128.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!