cancel
Showing results for 
Search instead for 
Did you mean: 

I want to save JSON request and response in shared drive using groovy script.

Sirisha2020
Contributor

I want to save JSON request and response in shared drive using groovy script.

Hi All,

 

I have requirement like, JSON request and response files need to be saved in the shared location. Currently able to save all the testcases requests/responses in the local folder using groovy. Is there way to save the same in shared location. 

 

Thanks.

4 REPLIES 4
joejoyce
Staff

Re: I want to save JSON request and response in shared drive using groovy script.

Hey @Sirisha2020 , is there a reason you're using Groovy Script to do this? With, for example, the Data Sink test step in ReadyAPI Test, you can store data collected in your tests to an external location (like a shared drive, in your case). 

 

Documentation for that step is here: https://support.smartbear.com/readyapi/docs/functional/steps/data-sink.html

Sirisha2020
Contributor

Re: I want to save JSON request and response in shared drive using groovy script.

Hi joe,

Thanks for your reply. We are trying to save the JSON requests and
responses using groovy script. Now, we are able to save the
requests/response in our local folder. But we are trying to find is there
any way to save them using a groovy script in our project folder.

Thanks.
joejoyce
Staff

Re: I want to save JSON request and response in shared drive using groovy script.

Thanks for the extra info. Where is the Project folder located? Is there a reason that it's more difficult to save it in this location than locally?

nmrao
Community Hero

Re: I want to save JSON request and response in shared drive using groovy script.

Thorough not sure how you are currently saving the requests and responses, you could map or mount the shared location to your drive and use that.
For example //shared/data can be mapped to local z / y drive(it can be any name) and write there what is the issue unless the location is hard coded. You can use a project property for the location as it can change on computer.

Another approach can be write a batch script to copy once execution is completed.


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors