Ask a Question

Is there a way to execute API call if a test suite passed?


Is there a way to execute API call if a test suite passed?

Our tool we use to record our use-cases has an API service. I would like to send an API call and set the use-case to pass if all the related tests have passed.

Is there a way (or sample groovy) to execute an API call only if a set of tests (full suite, or a few suites) have passed?

SmartBear Alumni (Retired)

Hi Smadji,



From my understanding, you can add an Assertion that will check the information you need to have in your responses. Please read the following article for more information:

Tanya Yatskovskaya
SmartBear Community and Education Manager

Hi Tanya

Thanks for your reply. I have 100s of tests already and use a variety of assertions. I am looking into taking my tests to the next step and having them automatically log their success skipping the human verification.

Lets say my tests have 2 kind of searches, search by name and search by location. I created one suite that tests all the search by name scenarios and created another suite that tests search by location scenarios. 

Now when I run my tests if all the tests that search by name passed and all the tests that search by location passed - at this point I would manually go and set the 'search' use-case to pass on a separate tool. That tool has an API service. I would like my test to look at all the results - if they all pass for those 2 suites - to send a signal to the use-case software to set that use-case to pass.


I know there is an option to make a hard stop to the test if anything fails, and if I set my test to such a scenario I can add a step at the end to signal the use-case-software to pass(since the test will only get there if all the steps passed). However, I don't want to go that route. Because if anything does fail - it will require more manual intervention (which is what I am trying to cut)


So I am trying to find out if there is a way to determine using groovy or another tool on readyAPI if a suite had passed completely - if it did - send the signal, else - dont send (or send fail).

Showing results for 
Search instead for 
Did you mean: