搭建这套环境前,需要Eclipse安装testNG,Maven
1.Eclipse安装testNG
https://mp.youkuaiyun.com/postedit/81868683
2.Eclipse安装Maven
http://www.cnblogs.com/pengyan-9826/p/7767070.html(转)
3.打开Eclipse新建maven工程
4.新建完成后在pom.xml文件里面替换信息,懒人大法哈哈哈。目的是加载依赖的jar。
<?xml version="1.0" encoding="UTF-8"?>
<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>JKTest</groupId>
<artifactId>JKTest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>JKTest</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.5</version>
<scope>test</scope>
</dependency>
<!--