We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More

Forum Discussion

TestService's avatar
TestService
New Contributor
11 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

 

1 Reply

  • nmrao's avatar
    nmrao
    Community Hero
    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 http://www.soapui.org/scripting---properties/tips---tricks.html