![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
testng
文章平均质量分 77
kevinleepk
这个作者很懒,什么都没留下…
展开
-
TestNG 教程1 – 基本使用方法
该教程介绍了TestNG支持的常见注解(annotation) package com.fenby.testng; import java.util.*;import org.testng.Assert;import org.testng.annotations.*; public class TestNGTest1 { private Collection collection; @B原创 2013-08-02 11:07:31 · 3291 阅读 · 0 评论 -
TestNG 教程3 – 忽略测试方法
如果有些方法不需要测试,我们只需要将@Test注解中的enabled设置为false就可以了,这样TestNG将自动过滤掉这个方法。 package com.fenby.testng; import org.testng.annotations.Test; /** * TestNG Ignore Test * @author fenby.com * */ public class T原创 2013-08-03 14:06:03 · 2232 阅读 · 0 评论 -
TestNG 教程2 – 期待异常测试
以下代码用来测试从方法中抛出的异常。 package com.fenby.testng; import org.testng.annotations.*; /** * TestNG Expected Exception Test * * @author fenby.com * */ public class TestNGTest2 { @Test(expectedExcep原创 2013-08-02 15:01:31 · 1446 阅读 · 0 评论 -
TestNG 教程4 – 超时测试
超时测试意味着如果方法的执行时长超过了指定时间后该测试将被终止,同时会把这个方法标注为测试失败。 package com.fenby.testng; import org.testng.annotations.*; /** * TestNG TimeOut Test * @author fenby.com * */ public class TestNGTest4 { @Tes原创 2013-08-03 16:09:24 · 1945 阅读 · 1 评论