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);
    }
}

 

 

 

posted @ 2019-08-26 09:58  怪圣卡杰  阅读(297)  评论(0)    收藏  举报