Webdriver+testNG+ReportNG+Maven+SVN+Jenkins自动化测试框架的pom.xml配置
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.main.stuty</groupId>
<artifactId>web-driver</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>web-driver</name>
<url>http://maven.apache.org</url>
<!-- maven 参数配置,这里引用不同的testng.xml -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- 解决控制台输出乱码问题 -->
<argLine>-Dfile.encoding=UTF-8</argLine>
<xmlFileName>testng.xml</xmlFileName>
</properties>
<!-- maven 引用依赖不同的jar -->
<dependencies>
<!-- 依赖testNg -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
<!-- 避免编译时提示jar包依赖找不到的问题-->
<!-- <scope>test</scope> -->
</dependency>
<!-- 依赖reportNg 关联testNg -->
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.4</version>
<scope>test</scope>
<!-- 此处排除了testng,因为reportNg中本身就有testng的jar包依赖-->
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 依赖Guice -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>
<!-- 依赖Selenium驱动包 -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.0</version>
<scope>compile</scope>
<!-- scope标签中对应值的解释: * compile,缺省值,适用于所有阶段,会随着项目一起发布。 * provided,类似 compile,期望
JDK、容器或使用者会提供这个依赖。如 servlet.jar。 * runtime,只在运行时使用,如 JDBC 驱动,适用运行和测试阶段。 *
test,只在测试时使用,用于编译和运行测试代码。不会随项目发布。 * system,类似 provided,需要显式提供包含依赖的 jar, Maven
不会在 Repository 中查找它。 -->
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.12</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 添加插件maven-surefire-plugin(用来在maven构建生命周期的test phase执行一个应用的单元测试), 关联testNg.xml,添加ReportNg的监听器,修改最后的TestNg的报告 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>res/${xmlFileName}</suiteXmlFile>
</suiteXmlFiles>
<!-- <systemPropertyVariables>标签设置为false为了让log中的html在页面上正常显示,避免直接显示为html字符串 -->
<systemPropertyVariables>
<org.uncommons.reportng.escape-output>false</org.uncommons.reportng.escape-output>
</systemPropertyVariables>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>org.uncommons.reportng.HTMLReporter</value>
</property>
</properties>
<workingDirectory>target/</workingDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
</project>
Webdriver+testNG+ReportNG+Maven+SVN+Jenkins自动化测试框架的pom.xml配置的更多相关文章
- Maven使用笔记(四)pom.xml配置详解
pom.xml文件配置详解 --声明规范 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=" ...
- Maven教程初级篇02:pom.xml配置初步
1. 创建项目并更改项目基本配置信息 在命令行下运行如下命令创建一个项目: 1 mvn archetype:create -DgroupId=net.jianxi.tutorials 2 ...
- Maven打可执行包的pom.xml配置
单独打出可执行包,然后将依赖包打入lib文件价中 <build> <plugins> <plugin> <groupId>org.apache.mave ...
- Maven入门 项目的生命周期&pom.xml配置&仓库
- 《手把手教你》系列基础篇(九十三)-java+ selenium自动化测试-框架设计基础-POM设计模式实现-上篇(详解教程)
1.简介 上一篇介绍了POM的基础理论知识和非POM方式写脚本,这篇介绍利用页面工厂类(page factory)去实现POM,通过查看PageFactory类,我们可以知道它是一个初始化一个页面实例 ...
- 《手把手教你》系列基础篇(九十四)-java+ selenium自动化测试-框架设计基础-POM设计模式实现-下篇(详解教程)
1.简介 上一篇宏哥用PageFactory实现了POM,宏哥再介绍一下如果不用PageFactory如何实现POM. 2.项目实战 在这里宏哥以百度首页登录的例子,如果用POM实现,在测试脚本中实际 ...
- Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):4、Maven项目转换与pom.xml配置
文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...
- pom.xml 配置maven私服
1.pom.xml 配置maven私服 <repositories> <repository> <id>caf_repositories& ...
- jenkins+maven+junit构建自动化测试,整合junit xml生成直观的测试报告[留存]
在自动化测试过程中,测试报告最能直观的体现测试的价值,之前一直使用maven+junit来构建我的自动化测试,但这样有几个缺点,一是,不能定时构建自动化任务(也许是我没有找到maven有没有提供这样的 ...
随机推荐
- 自己写deque
//deque /* what is a deque? In Chinese, it's called "双端队列". It's different from a queue. I ...
- strrchr
strrchr() 函数查找字符在指定字符串中从正面开始的最后一次出现的位置,如果成功,则返回从该位置到字符串结尾的所有字符,如果失败,则返回 false.与之相对应的是strchr()函数,它查找字 ...
- amazeui 搜索 动态
<!doctype html> <html class="no-js"> <head> <meta charset="utf-8 ...
- 让 idea webstorm phpstorm 能够 识别 thinkphp 的方法(自动提示功能)
1.在/ThinkPHP/Library/Think 目录下 新建一个文件,名为: BaseController.class.php 2.BaseController.class.php 内容为 n ...
- linux服务器被攻击处理过程
开始排查 首先检查日志,以前做过安全运维,所以写过类似于检查命令和工具,开始一一排查. #查看是否为管理员增加或者修改 find / -type f -perm #显示文件中查看是否存在系统以外的文件 ...
- C++对象模型笔记之程序设计模型
C++程序设计模型支持三种程序设计模型 1.程序模型(procedural model) 可以理解为过程化模型,就像C一样 2.抽象数据类型模型(ADT) 数据结构教材里有说过,查了下资料也不是很明确 ...
- NOIP2012-普及组复赛-第二题-寻宝
题目描述 Description 传说很遥远的藏宝楼顶层藏着诱人的宝藏.小明历尽千辛万苦终于找到传说中的这个藏宝楼,藏宝楼的门口竖着一个木板,上面写有几个大字:寻宝说明书.说明书的内容如下:藏宝楼共有 ...
- SharePoint2013 Excel导出好的代码
C#Excel操作类ExcelHelper.cs 来源:http://www.hellocsharp.com/article/67.aspx C#源码世界 发布于: 2014-09-12 使用本类之前 ...
- java实现线程的3中方式
1.继承Thread类实现多线程继承Thread类的方法尽管被我列为一种多线程实现方式,但Thread本质上也是实现了Runnable接口的一个实例,它代表一个线程的实例,并且,启动线程的唯一方法就是 ...
- laravel性能优化
1. 配置信息缓存 使用以下 Artisan 自带命令,把 config 文件夹里所有配置信息合并到一个文件里,减少运行时文件的载入数量: php artisan config:cache 上面命令会 ...