ITAbteilung
14 years agoContributor
[Resolved] Transfering Data from MockupScript to TestCase
Hi,
I have got a mockup that runs a script, which runs a Testcase. This Testcase has to operate with some variables produced in the Mockup-Script, so I need to transfer the variables from the Mockup-Script to the Testcase. The way I do it is:
Mockup script:
Script inside of the TestCase:
That works fine with simple Datatypes. The problem now is that i need to transfer more complex data like an ArrayList ( or a Groovy List). When I try that i get that errormessage:
What's the way to go?
Sincerely,
Pat
I have got a mockup that runs a script, which runs a Testcase. This Testcase has to operate with some variables produced in the Mockup-Script, so I need to transfer the variables from the Mockup-Script to the Testcase. The way I do it is:
Mockup script:
def testCase = mockResponse.mockOperation.mockService.project.testSuites["TS1"].testCases["TC1"];
testCase.setPropertyValue( "orderId", arg_orderId);
testCase.run( new com.eviware.soapui.support.types.StringToObjectMap(), true);
Script inside of the TestCase:
def orderId = testRunner.testCase.getPropertyValue( "orderId");
That works fine with simple Datatypes. The problem now is that i need to transfer more complex data like an ArrayList ( or a Groovy List). When I try that i get that errormessage:
java.lang.Exception: No signature of method: com.eviware.soapui.impl.wsdl.WsdlTestCasePro.setPropertyValue() is applicable for argument types: (java.lang.String, java.util.ArrayList) values: [id, [abc, def]]
Possible solutions: setPropertyValue(java.lang.String, java.lang.String), getPropertyValue(java.lang.String)
What's the way to go?
Sincerely,
Pat