Jtester的使用

来源:互联网 发布:csol淘宝租号 编辑:程序博客网 时间:2024/05/13 22:52

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

0 0
原创粉丝点击