简体   繁体   中英

groovy.lang.MissingPropertyException: No such property: getTestCaseByName for class:

Did any one face this issue? is there any solution for this?

To run the step InvalidLoginAttempt from test case session I have tried the below script

testRunner.testCase.testSuite.getTestCaseByName("Session").runTestStepByName("InvalidLoginAttempt") 

It was throwing

groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.runTestStepByName() is applicable for argument types: (java.lang.String) values: [InvalidLoginAttempt] Possible solutions: getTestStepByName(java.lang.String), getTestStepByName(java.lang.String) error at line: 4

So tried changing

testRunner.testCase.testSuite.getTestCaseByName("Session").runTestStepByName["InvalidLoginAttempt"] 

getting below error.

groovy.lang.MissingPropertyException: No such property: runTestCaseByName for class: com.eviware.soapui.impl.wsdl.WsdlTestSuite error at line: 4

尝试在下面,它得到了工作.. :)

def r = testRunner.testCase.testSuite.getTestCaseByName("Session").getTestStepByName("InvalidLoginAttempt").run(testRunner, context);

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