testing - How to define a method with return type in Groovy script in SoapUI? -
i need method should return string type value caller. that, have written following script.
string getmethodvalue = returncountryname("us"); string returncountryvalue(string cname) { cname = "mauritius"; return cname; } // assign values global properties , call servive com.eviware.soapui.soapui.globalproperties.setpropertyvalue( "countryname", getmethodvalue ) // call getcitiesbycountry service run def teststep = testrunner.testcase.teststeps['getcitiesbycountry']; teststep.run(testrunner,context); // message log.info("testcase execution completed successfully.") i'm not able find solution error message shown in following screenshot.

what shall overcome error in script?
thanks,
karunagara pandi g
you declare method returncountryvalue
string returncountryvalue(string cname) { cname = "mauritius"; return cname; } but call returncountryname. change name of method or name of invocation.
Comments
Post a Comment