Forum Discussion

Sirisha2020's avatar
Sirisha2020
Contributor
4 years ago

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.

    • Sirisha2020's avatar
      Sirisha2020
      Contributor
      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's avatar
        joejoyce
        Staff

        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's avatar
    nmrao
    Champion Level 3
    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.