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.

enter image description here

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

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -