I need a method that should return a string type value to the caller. For that, I have written the following script.
String getMethodValue = ReturnCountryName("US");
String ReturnCountryValue(String CName)
{
CName = "Mauritius";
return CName;
}
// Assign values to the global properties and call the servive
com.eviware.soapui.SoapUI.globalProperties.setPropertyValue( "CountryName", getMethodValue )
// Call GetCitiesByCountry service to run
def testStep = testRunner.testCase.testSteps['GetCitiesByCountry'];
testStep.run(testRunner,context);
// Message
log.info("Testcase execution is completed successfully.")
I'm not able to find the solution for the error message as shown in the following screenshot.
What shall I do to overcome this error in the script?
Thanks,
Karunagara Pandi G
You declare a method ReturnCountryValue
String ReturnCountryValue(String CName) {
CName = "Mauritius";
return CName;
}
but call ReturnCountryName
. Change the name of the method or the name of the invocation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With