Forum Discussion
Kronos_-_soapUI_1
14 years agoOccasional Contributor
Hi Erik. What I'm really trying to do is open a Project programatically that will work on both Pro and Free versions. We run our automation on the free version (for now, request is in), but develop in Pro. How can I open a project so that it will work in both versions? For example:
import com.eviware.soapui.impl.wsdl.WsdlProjectPro
import com.eviware.soapui.impl.wsdl.WsdlTestSuite
import com.eviware.soapui.support.types.StringToObjectMap
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase
workspace = testRunner.getTestCase().getTestSuite().getProject().getWorkspace()
wsdlProject = workspace.getProjectByName("TestCase Library")
libraryPath = wsdlProject.getPath()
try {
tcLibrary = new com.eviware.soapui.impl.wsdl.WsdlProjectPro(libraryPath)
}
catch (Throwable t) {
tcLibrary = new com.eviware.soapui.impl.wsdl.WsdlProject(libraryPath)
}
WsdlTestSuite wsdlTestSuite = tcLibrary.getTestSuiteByName("TestCase Library")
WsdlTestCase wsdlTestCase = wsdlTestSuite.getTestCaseByName("SetGlobalProperties")
wsdlTestCase.run(new StringToObjectMap(context),false)