Ask a Question

Asserting response at project level

New Contributor

Asserting response at project level


I have lot of requests in my test suite on which I am asserting the http status code and status of my response. Is it possible to add a common assertion or groovy script at project or test suite level which will run for all test steps if assertions are same for all test steps.



Community Hero

Re: Asserting response at project level

Hi @meetu1,


I think this approach of asserting the response at Test Suite Level is not good because you will come to know about any Environment down or other issues after the execution of each and every Test Case.


Best Approach is assert each and every Request you are adding into Test Case.


For the Solution of your Scenario:


Write a groovy class with assertions that you want to include , make a jar and place it in the {{..\bin\ext}} folder of SoapUI/ReadyAPI. 

Restart SoapUI/ReadyAPI. 

Go to the request step and add script assertions, import groovy class and invoke the assertion method written in jar.


Do Like if you Find this as solution



Himanshu Tayal

Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓

Thanks and Regards,
Himanshu Tayal
New Contributor

Re: Asserting response at project level

Thanks @HimanshuTayal I already have script assertions at the request level but was wondering if there is any way to add them at project level as all my requests have similar assertions so instead of adding assertion at each request if I could use some event listener which would assert the response of each request.

Frequent Contributor

Re: Asserting response at project level

Good question. The simple answer would be - not at a project or testsuite level. However, I understand you do not want to keep repeating same thing everywhere so therefore you could have a groovy script in a class to assert for your response code and all you have to do is to ensure you call that script from the script library in your responses.

Might be able to help you 🙂

Showing results for 
Search instead for 
Did you mean: