How to define array in Groovy soapUI?

我怕爱的太早我们不能终老 提交于 2020-05-16 05:16:25

问题


I am working in soapUI. I need to define Array in Groovy in soapUI groovy script.

Could you please help me


回答1:


// Define the array
def MAX_SIZE = 4
def myArray = new Object[MAX_SIZE]

// Fill the array
myArray[0] = "This"
myArray[1] = "is"
myArray[2] = "my"
myArray[3] = "array."

// Print content of the array
myArray.each { log.info(it) }



回答2:


See here, for example: http://groovy.codehaus.org/JN1025-Arrays



来源:https://stackoverflow.com/questions/8968028/how-to-define-array-in-groovy-soapui

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!