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有没有提供这样的 ...
随机推荐
- ebtables使用的协议
ebtables的参数中: -p:指明使用的协议类型,ipv4,arp等可选(使用时必选)详情见/etc/ethertypes --ip-proto:IP包的类型,1为ICMP包,6为TCP包,17为 ...
- Activity的四中启动模式的应用场景。
1,standard 默认情况下的启动模式,队列排序,linked 2,singleTop ,任务栈栈顶只有一个实例.如果Activity A在栈顶,就不会在A 的上面创建新的 Activity A ...
- LeetCode OJ 84. Largest Rectangle in Histogram
Given n non-negative integers representing the histogram's bar height where the width of each bar is ...
- 防暴力破解 Fail2Ban之python
fai2ban的介绍 fail2ban可以监视你的系统日志,然后匹配日志的错误信息(正则式匹配)执行相应的屏蔽动作(一般情况下是调用防火墙屏蔽),如:当有人在试探你的SSH.SMTP.FTP密码,只要 ...
- Just do it!!!
从今日起,开个开发自己个人轻量级博客,加油!!!!!
- 2015 Multi-University Training Contest 9
1001 Expression 式子不好推啊.见官方题解. 式子知道就方便了.处理好组合数和阶乘. 按区间长度从小到大递推完就好. # include <iostream> # inclu ...
- SQL 课程 子查询
今天,我主要学习了子查询的内容. create database lianxi0720 go use lianxi0720gocreate table bumen( bcode int primary ...
- 测试sql性能方法
SET STATISTICS io ON SET STATISTICS time ON go ---你要测试的sql语句 selec ...
- opencv轮廓处理函数详细
ApproxChains 用多边形曲线逼近 Freeman 链 CvSeq* cvApproxChains( CvSeq* src_seq, CvMemStorage* storage, int me ...
- viewPager的切换动画
今天在看苏州通的代码,里面有个引导的代码,涉及到viewPager的切换动画: DepthPageTransformer : package com.soyoungboy.guide; import ...