TestNg-08-超时测试

2020-03-12  本文已影响0人  请叫我刚爷

就是是否按照规定时间执行结束

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);
    }
}
333.png
上一篇 下一篇

猜你喜欢

热点阅读