测试框架设计学习笔记 - 3
2018-03-21 23:15
274 查看
学习到28节,testng部分结束了,开始学习Maven。主要内容是Maven的介绍,安装,配置,和几个主要Maven命令:
mvn archetype:generate
mvn eclipse:eclipse
mvn test
mvn test -Psanity //sanity 是POM.xml中某个profile的id,命令行执行也是异常方便,在Jenkins上异常好用…
Maven中groupId、artifactId的作用。以下是一个配置了多个testng XML文件的Maven pom.xml文件,还是挺好理解的。
工作的项目中其实是用gradle,Groovy语言写的配置文件确实比xml清爽多了。
mvn archetype:generate
mvn eclipse:eclipse
mvn test
mvn test -Psanity //sanity 是POM.xml中某个profile的id,命令行执行也是异常方便,在Jenkins上异常好用…
Maven中groupId、artifactId的作用。以下是一个配置了多个testng XML文件的Maven 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.pactera.wh</groupId> <artifactId>webtest</artifactId> <version>1</version> <packaging>jar</packaging> <name>webtest</name> <url>http://maven.apache.org</url> <profiles> <profile> <id>sanity</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.21.0</version> <configuration> <suiteXmlFiles> <suiteXmlFile>sanity.xml</suiteXmlFile> </suiteXmlFiles> </configuration> </plugin> </plugins> </build> </profile> <profile> <id>regression</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.21.0</version> <configuration> <suiteXmlFiles> <suiteXmlFile>regression.xml</suiteXmlFile> </suiteXmlFiles> </configuration> </plugin> </plugins> </build> </profile> </profiles> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.11</version> <scope>test</scope> </dependency> </dependencies> </project>
工作的项目中其实是用gradle,Groovy语言写的配置文件确实比xml清爽多了。
相关文章推荐
- 测试框架设计学习笔记 - 4
- 测试框架设计学习笔记 - 2
- 测试框架设计学习笔记 - 1
- Selenium测试框架学习笔记
- jBPM-jPDL学习笔记—框架设计简介(四)
- Robot Framework测试框架学习笔记
- 学习笔记_Java_day12_设计模式MVC(13).JavaWeb的三层框架(14)
- hibernate框架学习笔记1:搭建与测试
- Android自动化测试框架Robotium学习笔记
- yii框架设计学习笔记(一)
- jBPM-jPDL学习笔记—框架设计简介(五)
- 『框架设计(第2版)CLR Via C#』学习笔记(001)——将源代码编译成托管模块
- jBPM-jPDL学习笔记—框架设计简介(六)
- jBPM-jPDL学习笔记—框架设计简介(三)
- 深度学习框架Caffe学习笔记(6)-测试自己的手写数字图片
- jBPM-jPDL学习笔记—框架设计简介(四)
- Js测试框架学习笔记(一)
- jBPM学习笔记—框架设计简介
- 『框架设计(第2版)CLR Via C#』学习笔记(002)——将托管代码合并到程序集
- jBPM学习笔记—框架设计简介