cancel
Showing results for 
Search instead for 
Did you mean: 

Failing a teststep using context class

Contributor

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 testRunner.fail() 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.

 

Cheers,

Varun

 

1 REPLY 1
Highlighted
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:

http://readyapi.smartbear.com/structure/cases/options/basic

---------
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:
Watch the new Interview
Top Kudoed Authors