--
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 testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
I didn’t quite understand what is the problem. But it looks like you are trying to grab hold of the current @Test method’s ITestResult object from within some method that is invoked via a @Test method.
For doing that, you can always access the current @Test method’s ITestResult via Reporter.getCurrentTestResult() method.
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/
No out of the box exists. You would need to build this on your own by retrieving the current ITestContext and then checking if it has any failures and if so then skip the execution of @AfterTest.