Madhav
7 years agoOccasional Contributor
Unable to Call Test Step in another test case by using Groovy scripts
project = testRunner.testCase.testSuite.project;
tcase = project.testSuites {"TestSuite"}.testCase{"TestCaseName"}
hello = tcase.getTestStepByName("Hello");
testStep.run(testRunner,context)
context.Hello.sayHello("Anil")
And getting error:- groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.WsdlProject.testSuites() is applicable for argument types: (Script14$_run_closure1) values: [Script14$_run_closure1@a8cd35] Possible solutions: getTestSuites() error at line: 2
Hi,
tcase = project.testSuites {"TestSuite"}.testCase{"TestCaseName"}
These curly brackets should be square brackets:
tcase = project.testSuites ["TestSuite"].testCase["TestCaseName"]
Error is :- Missing PropertyException:No such property:testStep for class:Script27 error lat ine:4