java TestNg自动化测试框架环境搭建
搭建TestNg测试框架需要安装testNg插件
下载地址:http://testng.org/doc/download.html
http://dl.bintray.com/testng-team/testng-eclipse-release/zipped/6.14.0.201802161500/(下载最新版6.14.0)
下载后解压,把相应的文件放到eclipse中
还可以在线安装插件
TestNg框架搭建需要的jar包: com.beust.jcommander_1.72.0.jar
org.testng_6.14.2.r201802161450.jar
selenium需要的jar包
selenium-server-standalone-3.9.1.jar
示例如下
new--other---testNg classes创建testNg的测试类
package com.test;
import org.testng.annotations.AfterTest;
import org.testng.annotations.Test;
@Test
public class TestNgAdd {
@AfterTest
public void testAdd() {
System.out.println("---------test-----------");
}
}