Script assertion in my API request is not running when request log shows Connection refused and there is no reponse.
This happens when i run the test case as a set with multiple steps and if i run the API step manually, the assertion seems to work?
I want the script assertion to run even if the request fails as i am reading the Error log of ReadyAPI via groovy script and doing an assertion
Is there a way?
Can you please provide any kind of screenshot of error or your groovy script.
As you have mentioned, it seems that there is some problem with groovy code.
Click "Accept as Solution" if my answer has helped, and remember to give "kudos" 🙂 ↓↓↓↓↓
I have a script which triggers a specific API call step
After the step calls the Create Auth Token request , I get Connection refused in my Request log but then the groovy caller code is getting marked as fail as show.
Another solution that i was trying was to read the Request Log of the API call from groovy script for which I couldnt find any
As i see in error, it states connection refused, generally this error generates when there is some firewall settings.
Try to run this request individually, if it works individually then attached the full screenshot of groovy script.
Thanks for the response. THe error that i am getting is expected and intended.
I am wondering , how come the previous step where groovy script is running my test step is getting marked as red and failing. Is it because the request is failing.
I would like to capture the Request log and assert something there. if I run without the groovy script directly, I am observing , my script assertion doesnt seem to run in the API assertion