I have created successfully a test suite with Rest API and I have created groovy script to save request,response in the Local.
Problem what I am facing is I am not getting Rest Response is JSON format in the Local. But I get Request in JSON format.
Please refer the attachments for better understanding.
Apprecaite if anyone can help me in resolving this.
Solved! Go to Solution.
However you are getting your response as a String, you can get the human readable JSON by prettyprinting it:
Then write that version to the File.
Thanks for your quick reply.I have implemented pretty print statement in my coding.And I cannot find any response JSON format.
Could you suggest someother solution to resolve the issue.
Please find the attachment.
Change this like this:
response = response.with(groovy.json.JsonOutput.&prettyPrint)