1.在eclipse中安装testng插件,地址:http://beust.com/eclipse

2.设置testng环境变量

testng_home

D:\Program Files\eclipse\eclipse-jee-luna-SR2-win32-x86_64\plugins\org.testng.eclipse_6.9.5.201505260426\lib

在classpath中添加

;%testng_home%\testng.jar

3.在eclipse中右键xml文件,run as testng

05-08 07:58