testng--超时测试

package com.Paramter;

import org.testng.annotations.Test;

public class timeTest {
@Test(timeOut = 2000)
public void timeSuccesTest()throws InterruptedException{
Thread.sleep(1000);
}

@Test(timeOut = 2000)
public void timeFailTest()throws InterruptedException{
Thread.sleep(3000);
}
}
原文地址:https://www.cnblogs.com/520502-thy/p/15087197.html