TestNG Rerun failed tests with dataprovider run 2 times

14 views
Skip to first unread message

黄米阳

unread,
Aug 18, 2017, 9:54:13 AM8/18/17
to testng-users
case demo:

@DataProvider(name = "asdf",parallel = false)
public Object[][] adf() {
return new Object[][]{{"tsstt", "2"}, {"ttt", "1"}, {"asf", "2342"}, {"ttt", "tt"}, {"2", "2"}};
}

@Test(dataProvider = "asdf")
public void testcase01(String a, String b) {
System.out.println("a:" + a + "_b:" + b);
Time.sleep(1);
TestngRetry retry = new TestngRetry();
int i = retry.getRetryCount();
log.info("i:"+i+"=========");
if (a.equals("ttt")) {
Assert.assertTrue(false);
}

}

result:


Krishnan Mahadevan

unread,
Aug 19, 2017, 10:47:33 AM8/19/17
to testng...@googlegroups.com

Its not clear as to what is the issue here. Can you please help add some context around the problem ?

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

黄米阳

unread,
Aug 25, 2017, 1:58:09 AM8/25/17
to testng-users
This issue is fixed.  latest version can work. 

在 2017年8月19日星期六 UTC+8下午10:47:33,Krishnan Mahadevan写道:
Reply all
Reply to author
Forward
0 new messages