Hello Cedric,
On 26 Jul., 02:45, Cédric Beust ♔ <
ced...@beust.com> wrote:
>
> Actually, thinking about this more, this sounds like the normal behavior.
>
> When you run testng-failed.xml with only invocation 17 and 45, they are
> going to fail again, but since this time only two tests were run, the
> testng-failed.xml will be overwritten with the values 1 and 2...
>
yes, it seems like this is just how it works, no bug. Why I'm askig
this is because I
was thinking of rerunning failed tests of a test suite several times
to reduce the number of
false positives caused by instable test environment...
On 25 Jul., 16:37, Cédric Beust ♔ <
ced...@beust.com> wrote:
>
> Can't you get this information from
> ITestResult#getMethod()#getFailedInvocationNumbers()?
>
I tried using ITestResult#getMethod()#getFailedInvocationNumbers() and
it gives me
a list with numbers of invocations that failed so far. But to me it
seems like this list
is out of sync when accessing it with listeners (I used
IInvokedMethodListener and TestListenerAdapter)
and running the tests in parallel. E.g., as I called the
getFailedInvocationNumbers()
within afterInvocation() or OnTestFailure(), the list contained for
example 11,13,8 - but the current invocation
number was actually 4. So I don't know how to correctly assign the
invocation-numbers to the test results.
Thanks so far,
Daniel