How to treat failed test from RetryAnalyzer to skip

103 views
Skip to first unread message

kritsanai lerlertvanich

unread,
May 25, 2012, 6:12:03 AM5/25/12
to testng-users
Hi,

I have user RetryAnalyzer to re-run failed test case
but I notice that the re-run test case always report as failed however
that last run test is pass
could anyone help to suggest me how to treat failed from re-run test
to be skip or ignore this test

my code is as below



public class RetryAnalyzer implements IRetryAnalyzer{
private int count = 0;
private int maxCount = 1;

@Override
public boolean retry(ITestResult result) {
if(count < maxCount) {
System.out.println("Error in " + result.getName()+" with status " +
result.getStatus()+ " and this test have been retried once!!!");
count++;
return true;
}

return false;
}

}
Reply all
Reply to author
Forward
0 new messages