Ask a Question

changing Rest Resource path on one test case only

subhaD
Contributor

changing Rest Resource path on one test case only

I am testing error scenarios and trying to edit the Rest Resource path for one test case

I understand we can SubmitListener.beforeSubmit event handler 

log.info submit.request.getPath()
submit.request.setPath("/product/api/v4.0/foo")
log.info submit.request.getPath()

 

How to I make this execute only for one test case and not entire test suite???

4 REPLIES 4
Nastya_Khovrina
SmartBear Alumni (Retired)

Hi subhaD,

 

Use the Target column to apply an event only to specific test items. Please see the details in the Filter Events section of this article: https://support.smartbear.com/readyapi/docs/testing/handling-events.html.

Also, you should be able to change the endpoint for test steps on the Test Case Setup script: https://support.smartbear.com/readyapi/docs/soapui/scripts.html


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

I've been playing around with event handlers in the last couple of days and the linked detail is really helpful, so cheers!

Richie
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Nastya_Khovrina
SmartBear Alumni (Retired)

I'm glad to hear that it helped!


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

Thanks so much

 

But I still have some compilation errors when trying to change the resource path since i have created the prohject from swagger. Will i not be able to update resource property?? kindly get back, atttatching error screenerror_resource.PNG

cancel
Showing results for 
Search instead for 
Did you mean: