Forum Discussion

karipay's avatar
13 years ago

Help please (Context.expand).

Hi guys,

I have this groovy script below.

new File("/GetSubject").mkdir()
def myfolder = "C:/GetSubject/" + testRunner.testCase.name + ".xml"
def response = context.expand( '${TC0001#Response}' )
def f = new File(myfolder)
f.write(response, "UTF-8")

I can run this without any issue using newer version of SOAPUI but when I ran the same script using an older version of soapui (1.7.6) I get this error.

09:23:53,814 INFO [SoapUITestCaseRunner] running step [Groovy Script]
09:23:54,126 ERROR [log] groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext.expand() is applicable for argument types: (java.lang.String) values: {"${TC0001#Response}"}
09:23:54,126 ERROR [SoapUITestCaseRunner] Groovy Script failed, exporting to [Get Subject Regression-TC0001-Groovy Script-0-FAILED.txt]
09:23:54,126 INFO [SoapUITestCaseRunner] Finished running soapUI testcase [TC0001], time taken: 517ms, status: FAILED
09:23:54,173 INFO [SoapUITestCaseRunner] soapUI suite [Get Subject Regression] finished in 1265ms
09:23:54,173 ERROR [SoapUITestCaseRunner] java.lang.Exception: TestCase [TC0001] failed without assertions

09:23:54,173 ERROR [SoapUI] An error occured [TestCase [TC0001] failed without assertions
], see error log for details
java.lang.Exception: TestCase [TC0001] failed without assertions
at com.eviware.soapui.tools.SoapUITestCaseRunner.throwFailureException(SoapUITestCaseRunner.java:367)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:338)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:116)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:66)
at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:101)

Can someone please help me here?

Thanks In Advance!
No RepliesBe the first to reply