Ask a Question

groovy script to add REST step in test case

sfr
New Contributor

groovy script to add REST step in test case

Hello,

I am looking for a groovy script by which i would able to add REST type step in my test case. I am able to create an http request but unable to find a groovy code/script to add REST type step in added test cases.

Please help.

SF

4 REPLIES 4
nmrao
Community Hero

You could add a REST step using SoapUI easily.
Why do you need that? or use case please if you could not use the Out of the box SoapUI feature to do so?


Regards,
Rao.
sfr
New Contributor

I'm developing a framework that automates api testing with groovy without using the soapui box, the goal is to externalize the requests in config files
For that I tried:
def tc = suite.addNewTestCase (testCase)
tc.addTestStep (HTTPREQUEST_TYPE, url [i], method)
this script generates an http request, but I need a REST request. 

thank you, 

nmrao
Community Hero

Have you looked at the API docs?


Regards,
Rao.
simonjdonnelly
Contributor

cancel
Showing results for 
Search instead for 
Did you mean: