@Test(enabled =true)
@BeforeClass
@AfterClass
@BeforeSuit
@AfterSuit
@BeforeMethod
@AfterMethod
@BeforeGroup
@AfterGroup
异常测试
@Test(expectedExceptions=RuntimeException.class)
依赖测试
@Test(dependOnMethods = "test1")
参数化
@Parameter
@DataProvider ***
多线程测试
@Test(invocationCount = 10,threadPoolSize = 3)
@Test(timeOut=2000) //超时测试
TestNg 常用注解
最新推荐文章于 2023-03-13 14:03:37 发布