Ask a Question

Save REST response in soapui iteself i.e not to the external file

SOLVED
Bala_1980
Occasional Contributor

Save REST response in soapui iteself i.e not to the external file

Hi, I want to save the REST repose/s in the SOAPUI itself and not to the external file. Because I am creating project/suite/TC etc., whenver i want i have to refer the responses. Is it possible?, Thanks in Advance
3 REPLIES 3
avidCoder
Super Contributor

You can try this way :-

 

  1. Select the request you want to store responses from.
    In the "Request Properties" panel window scroll down to the property "Dump File", and enter a path for "Dump File".

  2. And later on you can leverage property expansion to make path dynamic.

This is the only way you can save it. Though it also save the file to your local folder only but it will be dynamic.

And another way is to use the external file to load it using file handle :-

File file = new File("C:\\Users\\avidCoder\\Desktop\\response.txt"); 
BufferedReader br = new BufferedReader(new FileReader(file)); 
nmrao
Champion Level 3

You may use Events feature to save the response
SubmitListener.afterSubmit() and add the code save the file. This way, you have better control where to save the responses dynamically in each run. Use /append timestamp for response file to be unique each time.


Regards,
Rao.
Bala_1980
Occasional Contributor

Thanks for the solution. The first one will help to solve the issue.

 

So, the SOAPUI tool does not have an option to store the response. Every time we need to run the test case and check the response. 

Thanks.

cancel
Showing results for 
Search instead for 
Did you mean: