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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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;
}