Reputation: 127
I'm having some problems with error messages in Groovy.
I was making a relatively simple call in my set-up script, like:
def count = 0
//Currently unused
//tarStep = runner.getTestStepByName("Setup and Check")
//def check = tarStep.getPropertyValue("fileCheck")
while(count < 5)
{
//if(check == true)
runner.gotoStepByName("PRequest1")
count++
}
And I get this error:
groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.panels.support.MockTestSuiteRunner.gotoStepByName() is applicable for argument types: (java.lang.String) values: [PRequest1]
A similar error happens when I uncomment the code "runner.getTestStepByName":
groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.panels.support.MockTestSuiteRunner.getTestStepByName() is applicable for argument types: (java.lang.String) values: [Setup and Check]
I'm not sure why those errors appear. I looked at some other questions about MissingMethodException but even though the problem is the same the answers don't apply to my errors.
I feel like I'm missing something simple here. How do I resolve the MissingMethodException?
Upvotes: 1
Views: 3167
Reputation: 34011
I think your runner
is of the wrong class. It looks like you need a MockTestRunner
, rather than a MockTestSuiteRunner
. The MockTestRunner
is the one with the gotoStepByName
method.
Upvotes: 2