2

I have a test listener class using extends AbstractWebDriverEventListener implements ITestListener, IInvokedMethodListener

in beforeInvocation a call to ITestNGMethod.getCurrentInvocationCount() returns 0 in afterInvocation a call to ITestNGMethod.getCurrentInvocationCount() returns 2

it's only one test, so why is the count at 2 after the invocation has finished? shouldn't it be 1?

i set a breakpoint to incrementCurrentInvocationCount() of org.testng.internal.BaseTestMethod.java and it's called once in IvokeMethodRunnable.java and then again in Invoker.java when the testNG method has finished.

so an invocation count of 2 means it was called 1? and 4 it was called 2?? :)

MushyPeas
  • 2,469
  • 2
  • 31
  • 48

0 Answers0