2012-01-23 76 views
1

我正在soapUI中工作。我需要在soapUI groovy腳本中的Groovy中定義數組。如何在Groovy soapUI中定義數組?

能否請你幫我

+0

請點擊這裏提供您的示例代碼。這使它更容易。 –

+0

你是指Groovy數組,還是soap-enc:數組? – Grooveek

回答

3
// 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) } 
+0

謝謝。這是我正在尋找的。 – ABCDEFG

+0

打印數組的非常不錯和簡短的方法 –