Apitesting
7 years agoSenior Member
Running a testcase from Project Setup Script
I am looking to run all my test cases in parallel but prior to execution I need to create members for which i have create a Test case and would like to call that test case from Project Setup. but as testRunner is not available there my test kept throwing error:
groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run() is applicable for argument types: (com.eviware.soapui.impl.wsdl.panels.support.MockProjectRunner, java.lang.Boolean) values: [com.eviware.soapui.impl.wsdl.panels.support.MockProjectRunner@19731a0, ...] Possible solutions: run(com.eviware.soapui.model.testsuite.TestCaseRunner, com.eviware.soapui.model.testsuite.TestCaseRunContext), find(), dump(), any(), grep(), wait()
I tried same code as a step , it works fine but from setup script it fails. Is it something wrong here.
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestSuiteRunner import com.eviware.soapui.support.types.StringToObjectMap def properties = new com.eviware.soapui.support.types.StringToObjectMap () log.info "Starting project execution" def scripts = project.testSuites["GroovyLibrary"]; //com.eviware.soapui.model.testsuite.TestCaseRunner, com.eviware.soapui.model.testsuite.TestCaseRunContext def trunner = new WsdlTestSuiteRunner(scripts, new StringToObjectMap()) //scripts.testCases["GroovyAutomationLibrary"].testSteps["APILibrary"].runSetupScript(trunner.getRunContext(), trunner) def apilib=scripts.testCases["GroovyAutomationLibrary"].testSteps["APILibrary"] apilib.run(runner, false); context.APILibrary.CreateMember(scripts)