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

 

TestNG(十一) 超时测试

 

TestNG(十一) 超时测试

 

相关文章:

  • 2021-12-03
  • 2022-02-03
  • 2022-12-23
  • 2022-02-12
  • 2021-11-15
  • 2022-12-23
  • 2021-06-02
猜你喜欢
  • 2022-12-23
  • 2022-03-06
  • 2021-04-18
  • 2022-12-23
  • 2021-04-16
  • 2021-05-30
  • 2021-07-13
相关资源
相似解决方案