当前位置 : 主页 > 网络安全 > 测试自动化 >

TestNG(十一) 依赖测试

来源:互联网 收集:自由互联 发布时间:2021-06-19
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 TestFa
 
  
  
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);
    }
}

 

 

网友评论