Forum Discussion

TestService's avatar
TestService
New Contributor
9 years ago

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