下面列出了org.testng.ITestNGMethod#getCurrentInvocationCount ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private String getStartingTestLabel(ITestNGMethod test) {
String invocationLabel = "";
if (test.getCurrentInvocationCount() > 0) {
invocationLabel = format(" (run %d)", test.getCurrentInvocationCount() + 1);
}
return getTestLabel(test, invocationLabel);
}
private String getCompletedTestLabel(ITestNGMethod test) {
String invocationLabel = "";
if (test.getCurrentInvocationCount() > 1) {
invocationLabel = format(" (run %d)", test.getCurrentInvocationCount());
}
return getTestLabel(test, invocationLabel);
}