TestNG(十一) 超时测试
package com.course.testng.suite; import org.testng.annotations.Test; public class TimeOutTest { @Test(timeOut = 3000) public void TestSuccess() throws InterruptedException { Thread.sleep(2000); } @Test(timeOut = 2000) public void TestFailed() throws InterruptedException { Thread.sleep(3000); } }
package com.course.testng.suite; import org.testng.annotations.Test; public class TimeOutTest { @Test(timeOut = 3000) public void TestSuccess() throws InterruptedException { Thread.sleep(2000); } }


创作不易,转摘请标明出处。如果有意一起探讨测试相关技能可加博主QQ 771268289 博主微信:ding17121598
本文来自博客园,作者:怪圣卡杰,转载请注明原文链接:https://www.cnblogs.com/dwdw/p/11410801.html
浙公网安备 33010602011771号