groovy.lang.MissingPropertyException:没有这样的属性:类的getTestCaseByName:

时间:2013-01-23 07:32:49

标签: groovy soapui

有没有人面对这个问题?对此有什么解决方案吗?

从测试用例会话运行步骤 InvalidLoginAttempt我尝试了以下脚本

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

投掷

groovy.lang.MissingMethodException:没有方法签名:com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.runTestStepByName()适用于参数类型:(java.lang.String)值: [ InvalidLoginAttempt] 可能的解决方案:getTestStepByName(java.lang.String),getTestStepByName(java.lang.String)错误在第4行

所以尝试改变

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

低于错误。

groovy.lang.MissingPropertyException:没有这样的属性:类的runTestCaseByName:com.eviware.soapui.impl.wsdl.WsdlTestSuite第4行错误

1 个答案:

答案 0 :(得分:3)

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

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