美文网首页
TestNg-08-超时测试

TestNg-08-超时测试

作者: 请叫我刚爷 | 来源:发表于2020-03-12 17:11 被阅读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

相关文章

网友评论

      本文标题:TestNg-08-超时测试

      本文链接:https://www.haomeiwen.com/subject/bvbmjhtx.html