[SoapUI] 通过Groovy脚本获取project所在的路径或者直接用${projectDir}

import com.eviware.soapui.support.GroovyUtils

def groovyUtils = new GroovyUtils( context )
def projectDir = groovyUtils.getProjectPath()
log.info "The project path on local is : "+projectDir

if(projectDir!=""){
	testRunner.testCase.testSuite.project.setPropertyValue( "projectPath", projectDir )
}

projectDir = context.expand('${#Project#projectPath}')

def testResultPath = projectDir+"\\TestResult\\"
log.info "Test result path : "+testResultPath

testRunner.testCase.testSuite.project.setPropertyValue( "testResultPath", testResultPath )

  [SoapUI] 通过Groovy脚本获取project所在的路径或者直接用${projectDir}_第1张图片

你可能感兴趣的:([SoapUI] 通过Groovy脚本获取project所在的路径或者直接用${projectDir})