小编Har*_*rry的帖子

如何将Groovy放在集中的Groovy库中,并从任何脚本访问该类

我有下面的Groovy脚本,我需要将它放在集中的Groovy库中,然后从我的Ready API项目路径中的任何脚本访问Groovy中提到的类 :D:\ GroovyLib\com\Linos\readyapi\util\property\propertyvalidation

//Change the name of the Properties test step below
def step = context.testCase.testSteps['Properties']

//Parse the xml like you have in your script
def parsedXml = new XmlSlurper().parse(file)

//Get the all the error details from the response as map
def errorDetails = parsedXml.'**'.findAll { it.name() == 'IntegrationServiceErrorCode'}.inject([:]){map, entry ->    map[entry.ErrorCode.text()] = entry.Description.text(); map    }
log.info "Error details from response  : ${errorDetails}"

def failureMessage = new StringBuffer()

//Loop thru properties of Property step and check against …
Run Code Online (Sandbox Code Playgroud)

groovy soapui ready-api

5
推荐指数
1
解决办法
852
查看次数

标签 统计

groovy ×1

ready-api ×1

soapui ×1