Forum Discussion
SmartBear_Suppo
11 years agoSmartBear Alumni (Retired)
Hi,
It looks like this line is causing the error because running through the command line the workspace is null i.e doesn't exist in that context.
To get the project try this:
Then you will be able to use the project methods such as getTestSuiteByName.
Regards,
Marcus
SmartBear Support
It looks like this line is causing the error because running through the command line the workspace is null i.e doesn't exist in that context.
library = testRunner.getTestCase().getTestSuite().getProject().getWorkspace().getProjectByName("Library")
To get the project try this:
import com.eviware.soapui.impl.wsdl.WsdlProject
//path to project file as argument
def library = new WsdlProject("C:\\SoapUI\\SOAPUI Projects\\JMS-Demo-Test-soapui-project.xml")
Then you will be able to use the project methods such as getTestSuiteByName.
Regards,
Marcus
SmartBear Support
Related Content
- 11 years agomike_lyons
Recent Discussions
- 22 hours agogroovyguy