TestNG Rerun failed tests with dataprovider run 2 times

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

TestNG Rerun failed tests with dataprovider run 2 times

黄米阳
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:


--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: TestNG Rerun failed tests with dataprovider run 2 times

Krishnan Mahadevan

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/

 

From: <[hidden email]> on behalf of 黄米阳 <[hidden email]>
Reply-To: <[hidden email]>
Date: Friday, August 18, 2017 at 2:26 PM
To: testng-users <[hidden email]>
Subject: [testng-users] TestNG Rerun failed tests with dataprovider run 2 times

 

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:

 

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: TestNG Rerun failed tests with dataprovider run 2 times

黄米阳
This issue is fixed.  latest version can work. 

在 2017年8月19日星期六 UTC+8下午10:47:33,Krishnan Mahadevan写道:

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 @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="fkM3sHntCgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...> on behalf of 黄米阳 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="fkM3sHntCgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">huang...@...>
Reply-To: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="fkM3sHntCgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...>
Date: Friday, August 18, 2017 at 2:26 PM
To: testng-users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="fkM3sHntCgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...>
Subject: [testng-users] TestNG Rerun failed tests with dataprovider run 2 times

 

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:

<a href="https://lh3.googleusercontent.com/-7St1hDiDM10/WZaryvGRGVI/AAAAAAAAAAo/JsifxgxqoxI8e-BUrEmOEJAgAYnETCb8gCLcBGAs/s1600/1.jpg" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://lh3.googleusercontent.com/-7St1hDiDM10/WZaryvGRGVI/AAAAAAAAAAo/JsifxgxqoxI8e-BUrEmOEJAgAYnETCb8gCLcBGAs/s1600/1.jpg&#39;;return true;" onclick="this.href=&#39;https://lh3.googleusercontent.com/-7St1hDiDM10/WZaryvGRGVI/AAAAAAAAAAo/JsifxgxqoxI8e-BUrEmOEJAgAYnETCb8gCLcBGAs/s1600/1.jpg&#39;;return true;">

 

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="fkM3sHntCgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="fkM3sHntCgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="https://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.