Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过jenkins运行soapUI测试套件时显示java.lang.ArrayIndexOutOfBoundsException错误_Jenkins_Groovy_Soapui - Fatal编程技术网

通过jenkins运行soapUI测试套件时显示java.lang.ArrayIndexOutOfBoundsException错误

通过jenkins运行soapUI测试套件时显示java.lang.ArrayIndexOutOfBoundsException错误,jenkins,groovy,soapui,Jenkins,Groovy,Soapui,当我通过jenkins运行testsuite时,日志中会显示“java.lang.ArrayIndexOutOfBoundsException”错误。 发生错误的行 def randomuserserial = Long.toUnsignedString(new Random().nextLong().abs(), 16).toUpperCase() 在本地计算机上运行同一套件时没有发生错误。看起来您的要求是生成一个随机的无符号长数字。因此,您可以尝试以下方法: def min = 10000

当我通过jenkins运行testsuite时,日志中会显示“java.lang.ArrayIndexOutOfBoundsException”错误。 发生错误的行

def randomuserserial = Long.toUnsignedString(new Random().nextLong().abs(), 16).toUpperCase()

在本地计算机上运行同一套件时没有发生错误。

看起来您的要求是生成一个随机的无符号长数字。因此,您可以尝试以下方法:

def min = 1000000000000000
def max = 9223372036854775807

def rand = new Random()
int range = max-min
def random_long = rand.nextInt(range) + min

def randomuserserial = random_long.toString().toUpperCase()
这将解决您的问题。

问题在于Jenkins服务器中安装的SoapUI(5.3.0)版本。
更新到最新版本(5.4.0)后,工作正常。

。但是很高兴知道。true在soapui 5.3.0上尝试了该命令,但出现了错误。一旦我升级,它就消失了。看起来变量的限制在最新版本中有所增加