678
6 years agoRegular Contributor
Test Suite is failing when executing command line where as passing using ReadyApi GUI
Test Suite is failing when executing command line where as passing using ReadyApi GUI
Project 1
Test Suite 1(Functions)
Test Suite 2 (Actual Test Cases)
TestCase1 (Dependecy Step from TestSuite1)
TestCase2 (No Dependency )
If i run using ReadyAPI gui running as expected as passing both test cases where as if i user command line only Test case 2 is passing where as Test case 1 failing
can any one help here
The problem is that the workspace instance is not available when you execute via command line.
Try use this code instead as proposed in the link i've send you above:
import com.eviware.soapui.model.project.ProjectFactoryRegistry import com.eviware.soapui.impl.wsdl.WsdlProjectFactory def workspace = testRunner.testCase.testSuite.project.workspace def testProject = (workspace==null) ? ProjectFactoryRegistry.getProjectFactory(WsdlProjectFactory.WSDL_TYPE).createNew("<path to your project>.xml") : workspace.getProjectByName("ViewingCardManager_v15B4.0") if(!testProject.open && workspace!=null) workspace.openProject(testProject) testProject.properties["mqResponse"].value = "blahblah"