Ask a Question

Response is not saved but file created when using script file

TestService
New Contributor

Response is not saved but file created when using script file

Hi 

 

I am new to soapui Automation. I am saving my response to a file using below script ( i copy pasted from the soapui forum).

 


def response = context.expand('${Temperature_conversion#TestSuite1#TestCase2#Response}')
def f = new File("G:/soapui programs/FPresponse.txt")
f.write(response, "UTF-8")

 

But when i am running the test case, the result is response file created but it is empty. 

 

After that i went into context class in soapui API docs and i couldnt find the expand method in the context class documentation. 

Can anybody pls explain what does context class does and expand method as well? or any documentation if you have, it will be morehelpful.

 

Thanks in advance

 

1 REPLY 1
nmrao
Community Hero

Re: Response is not saved but file created when using script file

Can you put on the details like how the test case is structured i.e., name and type of steps? Did you check 2.1 of www.soapui.org/scripting---properties/tips---tricks.html


Regards,
Rao.
cancel
Showing results for 
Search instead for 
Did you mean: