Showing results for 
Search instead for 
Did you mean: 

Failing a teststep using context class


Failing a teststep using context class

I am using pro version and I want to fail a teststep which has a script assertion.


I am aware that I can use function to fail a teststep in groovy but testRunner class doesn't have scope in script assertion. Only context,log and messageExchange classes has scope over there.


Please share is you have any idea about it.





Community Manager

Re: Failing a teststep using context class

Hi Varun,


You can enable the Fail TestCase on Error option to fail the entire test case when your assertion fails. Please read the following article to learn more about this option:

Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
Final Interview in the Series
Top Kudoed Authors