TestNG RunTime Listener

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

TestNG RunTime Listener

Nael Abd eljawad
Hi, 

I've added a script that generates GIF files using JUnit, created  a listener that extends RunListener class and overrides testFinish function which adds screenshots in runtime.
I'm trying to do the same by TestNG but can't find the listener I need to extends instead of RunListener class in JUnit.
I tried to implement multiple listeners interfaces (ITestListener, IInvokedMethodListener, IExecutionListener...), but i'm not getting the same results as JUnit.

FYI, I'm using cucumber After hook to generate GIF and running my tests by Maven and added the listener to maven POM.xml. 
The problem that after running by maven the cucumber hook executed before the listener implemented functions but by JUnit it works as expected.

Can you help please?

Thanks

--
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.