1.在eclipse中安装testng插件,地址:http://beust.com/eclipse
2.设置testng环境变量
testng_home
D:Program Fileseclipseeclipse-jee-luna-SR2-win32-x86_64pluginsorg.testng.eclipse_6.9.5.201505260426lib
在classpath中添加
;%testng_home% estng.jar
3.在eclipse中右键xml文件,run as testng