就是是否按照规定时间执行结束
package com.course.testng;
import org.testng.annotations.Test;
public class TimeOutTest {
@Test(timeOut = 10000)
public void testSuccess() throws InterruptedException {
Thread.sleep(2000);
}
@Test(timeOut = 1000)
public void testFailed() throws InterruptedException {
Thread.sleep(2000);
}
}

网友评论