elibio19
11 years agoNew Contributor
Error groovy.lang.readonly property exception cannot set rea
Hi, i add a groovy test script to change the values in properties. If i execute only this script, works well, but if i execute the entire test case i have an error
groovy.lang.readonly property exception cannot set readonly property
My script is this:
log.info( "SCRIPT CargaDatosIniciales" )
/////////////////////////////////////////////
def propiedades = testRunner.testCase.getTestStepByName( "Properties" );
def propIndex = propiedades.getProperty( "index" )
def propValores = propiedades.getProperty( "value" )
//se guarda como una cadena de texto, con los valores separados por un espacio en blanco
//se hace para luego poder hacer un split de la propiedad
def list = ""
for( i in 3 ){
list += i + " "
}
log.info( "Numero de elementos a consultar " + list.size() + "." )
log.info( list )
list = "A168533 A15244603 A574809"
propIndex.value = 0
propValores.value = list
groovy.lang.readonly property exception cannot set readonly property
My script is this:
log.info( "SCRIPT CargaDatosIniciales" )
/////////////////////////////////////////////
def propiedades = testRunner.testCase.getTestStepByName( "Properties" );
def propIndex = propiedades.getProperty( "index" )
def propValores = propiedades.getProperty( "value" )
//se guarda como una cadena de texto, con los valores separados por un espacio en blanco
//se hace para luego poder hacer un split de la propiedad
def list = ""
for( i in 3 ){
list += i + " "
}
log.info( "Numero de elementos a consultar " + list.size() + "." )
log.info( list )
list = "A168533 A15244603 A574809"
propIndex.value = 0
propValores.value = list