Script Error - getTestCaseByName
Can any one help here belo is my script
Script :
import com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus
import com.eviware.soapui.model.testsuite.TestRunner.Status
import com.eviware.soapui.model.project.ProjectFactoryRegistry
import com.eviware.soapui.impl.wsdl.WsdlProjectFactory
import com.eviware.soapui.impl.wsdl.*
import com.eviware.soapui.impl.wsdl.testcase.*
import com.eviware.soapui.model.testsuite.*
import com.eviware.soapui.model.support.PropertiesMap;
import com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner
import com.eviware.soapui.impl.WorkspaceImpl;
import java.io.File
def Workspace = testRunner.getTestCase().getTestSuite().getProject().getWorkspace()
def Project = (Workspace==null) ?
ProjectFactoryRegistry.getProjectFactory(WsdlProjectFactory.WSDL_TYPE).createNew('$Workspace') :
Workspace.getProjectByName("Automation")
if(!Project.open && Workspace!=null) Workspace.openProject(Project)
def datasource = context.expand( '${DataSource#set}' )
def Lib = Project.getTestSuiteByName("Library");
testCase = Lib.getTestCaseByName("TC_CreateAccount");
log.info "testcase Name="+testCase
Error :
ERROR [errorlog] An error occurred in the script of the Groovy Script test step [GroovyScript2]:
ERROR [errorlog] java.lang.NullPointerException: Cannot invoke method getTestCaseByName() on null object
- Looks author of the question is not bothered about providing the requested info.