[英]TestNG Groups: Can we include two group names and create one group to run tests?
[英]Can we pass two annotation(IRetryAnalyzer and priority) type as one in TestNG
我有一種情況,想一次使用IRetryAnalyzer和優先級作為測試用例。 我想在兩個參數下面使用/應用兩個參數
@Test(retryAnalyzer = test1.Retry.class)
@Test(priority=0)
例子:-
@Test(retryAnalyzer = test1.Retry.class)
@Test(priority=0)
public void Test1()
{
System.out.println("Retry attempt");
i++;
System.out.println("value of i ="+i);
if(i<2)
{
System.out.println("I m in fail Fail");
Assert.assertEquals(false, true);
}
if(i>=2) {
System.out.println("I m in fail pass");
Assert.assertEquals(false, false);
}
}
有什么辦法可以將兩個都應用於單個測試用例。
將兩個值合並為一個Test
注釋。
@Test(retryAnalyzer = test1.Retry.class, priority=0)
public void Test1()
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.