cancel
Showing results for 
Search instead for 
Did you mean: 

Importing JSON requests from local machine to soap ui in one short

SOLVED
Highlighted
Contributor

Importing JSON requests from local machine to soap ui in one short

Hi All,

 

I have crated a rest project in soapui for which I have aound 100 JSON request files in my local machine. Is there any script or way to copy all json requests from my local machine to soapui in one shot by creating individual test steps in soapui automatically instead of creating 100 test steps and then loading the requests manually?

Appreciate your help in advance.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Importing JSON requests from local machine to soap ui in one short

Yes, it is definitely possible provided writing the code the for the same.

Alternative way I can think of is to create a test case and use data driven script (again groovy script, refer
https://community.smartbear.com/t5/SoapUI-Open-Source/Data-Driven-Testing-in-Soapui-Free-version/td-...)
Create a csv file, have the file names in order in which you want to send request.
Have REST Request test step following groovy script.

In the data driven groovy script (you may have to modify to your need)
1. Read csv file first row, use a custom property for keeping the row count
2. Read file, and set this content as REST Request payload. Below should given some idea how to do.
https://github.com/nmrao/soapUIGroovyScripts/blob/85e6112abadb014cdb2d12ed3fb289cb2eea90af/groovy/js...



Regards,
Rao.

View solution in original post

2 REPLIES 2
Highlighted
Community Hero

Re: Importing JSON requests from local machine to soap ui in one short

Yes, it is definitely possible provided writing the code the for the same.

Alternative way I can think of is to create a test case and use data driven script (again groovy script, refer
https://community.smartbear.com/t5/SoapUI-Open-Source/Data-Driven-Testing-in-Soapui-Free-version/td-...)
Create a csv file, have the file names in order in which you want to send request.
Have REST Request test step following groovy script.

In the data driven groovy script (you may have to modify to your need)
1. Read csv file first row, use a custom property for keeping the row count
2. Read file, and set this content as REST Request payload. Below should given some idea how to do.
https://github.com/nmrao/soapUIGroovyScripts/blob/85e6112abadb014cdb2d12ed3fb289cb2eea90af/groovy/js...



Regards,
Rao.

View solution in original post

Highlighted
Contributor

Re: Importing JSON requests from local machine to soap ui in one short

Thanks for the note. Have tried as per the steps and its working.

New Here?
Join us and watch the welcome video:
Top Kudoed Authors