1.invocationCount
字面意思就是调用的次数统计,就是这个测试用例被调用执行的次数。
2. invocationTimeOut
字面意思是调用的超时,设置一个最大的毫秒数来计算执行多次后总共耗时多少,耗时值不能超过设置的最大毫秒数
@Test(invocationCount = 5, invocationTimeOut = 5100)
public void loginTest() throws InterruptedException{
Thread.sleep(1000);
System.out.println("login test");
}
测试执行结果:
累计执行五次,累计执行时间不能超时