TestNG(1)Eclipse 中安装 、使用TestNG
1、在线安装
- 首先打开 Eclipse,点击菜单栏:Help ->Install New Software;
- 点击“Add..”按钮,弹出 Add Repository 窗口,输入 name 和 location ;
- Name:TestNG
- location:http://beust.com/eclipse
- 然后,勾选 testNG,点击“Next”进行安装 ;
- 下载完成,点击“Next >” 根据提示完成安装 ;
2、离线安装
testNG官网:http://testng.org/doc/
点开之后点击“download”点开链接: http://beust.com/eclipse
- 选择某一版本,点击下载;
- 将解压缩的文件夹放到eclipse的dropin目录下,重启eclipse;
- 打开Eclipse,新建-other,选择“TestNG——>TestNG Class”,有这个就成功了;
3、安装TestNG之后,导入jar
4、创建TestNG单元测试项目
new –> other –> TestNG –> 确定