1.安裝TestNG
安裝TestNG Eclipse Plugin:
Eclipse:Help ->Install New Software ..-> Find and Install -> Search for new features to install
按 New Remote Site
Name:TestNG URL: http://beust.com/eclipse 安裝
安裝好TestNG後,在Eclipse中單擊"Window"->Show View->Other->Java->TestNG, TestNG的視圖就打開了。
在測試類的java editor中右鍵菜單中會出現如下選項安裝好TestNG後,在Eclipse中單擊"Window"->Show View->Other->Java->TestNG, TestNG的視圖就打開了
3.jtester中實現了強大的fluent interface式的斷言語法。其語法格式如下: want.object(value).assert()...
want後面跟着你要斷言的對象類型,目前jtester提供了下列幾種對象的斷言
o object o string
o number (int,double,float,long) o boolean
o collection (list,set,collection) o date/calendar o array (數組) o map o file