Eclipse安装TestNG插件

Eclipse安装TestNG

TestNG官网地址:http://testng.org/

在官网上部导航区域点击“Download”链接,该页面介绍了集成TestNG的不同方式。

在“Eclipse plug-in”区域介绍了两种Eclipse安装插件的方式。

硬性要求:JDK1.7以上版本、Eclipse4.2以上版本。

Java 1.7+ is required for running the TestNG for Eclipse plugin.

Eclipse 4.2 and above is required. Eclipse 3.x is NOT supported any more, please update your Eclipse to 4.2 or above.

两种在线安装方式:

1、通过Eclipse Marketplace安装;

     在浏览器中拖拽“Drag to your running Eclipse workspace to install TestNG for Eclipse”链接至Eclipse的工作空间,即可启动Eclipse Marketplace进行安装TestNG。

Eclipse安装TestNG插件

2、通过Update Site安装;

     通过update site也可以进行插件的安装,方法是:在Eclipse中点击Help菜单,选择Install New Software选项,在弹出页面中输入安装地址即可安装。

     http://beust.com/eclipse

Eclipse安装TestNG插件

 

离线安装TestNG插件:

受网络等因素影响,在线安装方式速度比较慢,可以通过如下方式离线安装TestNG插件。

通过浏览器直接访问网址, http://beust.com/eclipse

Eclipse安装TestNG插件

Eclipse安装TestNG插件

选择最下部的zipped文件夹链接;

Eclipse安装TestNG插件

选择版本,如:“6.10.0.201612030230/”

Eclipse安装TestNG插件

点击超链接,即可下载离线安装文件。

将安装文件解压至eclipse的dropin目录后重启Eclipse完成插件安装。

Eclipse安装TestNG插件

验证插件安装是否成功

打开Eclipse,新建-other,选择“TestNG——>TestNG Class”。

Eclipse安装TestNG插件

出现这个说明插件安装成功。