您所说的 TestNG 中的 timeOut 是什么意思?
timeOut 是 TestNG 中的一个辅助属性,如果测试方法消耗的时间超过 timeOut 持续时间,它可以结束该方法的执行。timeOut 时间以毫秒为单位设置,之后测试方法将被标记为失败。
示例
@Test
public void ContactVerify(){
System.out.println("Contact validation is successful”);
}
@Test(timeOut = 1000)
public void LandingPage(){
System.out.println("Landing page verification is successful”);
}
@Test
public void LoanContact(){
System.out.println("Loan contact details verification is successful”);
}如果在 1000 毫秒后 LandingPage() 执行继续,则该测试方法将被视为失败。其余测试方法不受影响。
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP