How to make single TestNG method fail and following test methods should continue.

31 views
Skip to first unread message

vishwanath vishwa

unread,
Mar 7, 2014, 1:48:52 AM3/7/14
to testng...@googlegroups.com
currently i have some 12 test methods and  want to make only 6th method to fail and rest coninues as it is ,but if  i use assert in 6th method everything following fails.please help me.
 
 

Krishnan Mahadevan

unread,
Mar 7, 2014, 2:37:36 AM3/7/14
to testng...@googlegroups.com
No. That's not how TestNG works. To the best of my knowledge, TestNG will run all tests irrespective of whether there are failures or not and report the failures at the end.

TestNG will only abort execution of tests, if there are failures in the configuration methods.[ This again can be controlled via the attribute 

configfailurepolicy = "continue"
in your suite xml file.

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/


On Fri, Mar 7, 2014 at 12:18 PM, vishwanath vishwa <vbp....@gmail.com> wrote:
currently i have some 12 test methods and  want to make only 6th method to fail and rest coninues as it is ,but if  i use assert in 6th method everything following fails.please help me.
 
 

--
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...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages