简体   繁体   中英

groovy.lang.MissingMethodException: No signature of method resolution

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM