List,
This is the situation :
1) I have a testclass with one test method
2) I create 6 instances of that test class using @Factory ( named
Test1, Test2, Test3 ... Test6 )
3) Odd number Test always fail ( Test 1 , Test3 and Test5 will fail, but Test2
, Test4 and Test6 will pass )
4) The test class has a retry listener implemented, with retry count as 2
Now after the test run I expect to see this
Failed tests:
Test1(com.test.RetryTest): expected:<true> but was:<false>
Test1(com.test.RetryTest): expected:<true> but was:<false>
Test3(com.test.RetryTest): expected:<true> but was:<false>
Test3(com.test.RetryTest): expected:<true> but was:<false>
Test5(com.test.RetryTest): expected:<true> but was:<false>
Test5(com.test.RetryTest): expected:<true> but was:<false>
Tests run: 9, Failures: 6, Errors: 0, Skipped: 0
but I got this
Failed tests:
Test1(com.test.RetryTest): expected:<true> but was:<false>
Test1(com.test.RetryTest): expected:<true> but was:<false>
Test3(com.test.RetryTest): expected:<true> but was:<false>
Test5(com.test.RetryTest): expected:<true> but was:<false>
Tests run: 7, Failures: 4, Errors: 0, Skipped: 0
As you can see only Test1 was retried , rest all tests just failed
after first failure. My guess is, its happening because while retrying
TestNG consider all instance of one method ( created by @factory) as
one method, hence once the retry quota is over for first method, it
does not bother to run it for other instances of same method. Seems
like a bug , what do you guys say ?
I am attaching the sample code with this email, and I am TestNG 6.3.1.
best,
Pranav
On Wed, Dec 7, 2011 at 1:48 AM, Pranav Verma <pranav...@gmail.com> wrote:
> List,
> This is the situation :
>
> 1) I have a testclass with one test method
> 2) I create 4 instances of that test class using @Factory ( named
> Test1, Test2, test3 and Test4 )
> 3) Odd number Test always fail ( Test 1 and Test3 will fail, but Test2
> and Test4 will pass )
> 4) The test class has a retry listener implemented, with retry count as 2
>
> Now after the test run I expect to see this
>
>
> Failed tests:
> Test1(com.test.RetryTest): expected:<true> but was:<false>
> Test1(com.test.RetryTest): expected:<true> but was:<false>
> Test3(com.test.RetryTest): expected:<true> but was:<false>
> Test3(com.test.RetryTest): expected:<true> but was:<false>
>
> Tests run: 5, Failures: 3, Errors: 0, Skipped: 0
>
>
>
> Test Run : 6, Failed :3, Skipped 15 ( coz 3 tests will fail, and as
> they should get retried 5 times each, hence 3*5=15)
>
> bit I got this
TIA,
Pranav
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Pranav