Hello all:
I have a script which contains a scriptStep example command. I need to
increment a date and validate it, so I though to do it with an easy
scriptStep. But as you can expect the step fails. The error is: Error
invoking script: java.lang.ClassNotFoundException:
org.apache.bsf.engines.javascript.JavaScriptEngine
Java is installed: java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)
Ant is running: Apache Ant version 1.7.0 compiled on December 13 2006
Please, can you see the code and tell me how to get and set webtest
properties?
The code is something similar:
<steps>
<storeProperty description="store diaApertura = 30"
property="diaApertura" value="30" propertyType="ant"/>
<storeProperty description="store mesApertura = 1"
property="mesApertura" value="30" propertyType="ant"/>
<storeProperty description="store anyoApertura = 2007"
property="anyoApertura" value="2007"
propertyType="ant"/>
<storeProperty description="store diaApertura = diaApertura +
2"
property="diaApertura" value="${diaApertura}+ 2"
eval="true" propertyType="ant"/>
<scriptStep description="calculate qty and price"
language="javascript" keep="true">
dia_max = 30;
mes_max = 12;
var_aux = 0;
var_dia = ${mesApertura};
var_mes = ${mesApertura};
var_anyo = ${anyoApertura};
if (var_dia > dia_max) {
var_mes = var_mes + 1;
var_dia = 1;
}
if (var_mes > 12)
var_anyo = var_anyo + 1;
var_mes = 1;
}
step.setWebtestProperty('diaApertura', var_dia);
step.setWebtestProperty('mesApertura', var_mes);
step.setWebtestProperty('anyoApertura', var_anyo);
</scriptStep>
</steps>
AVISO LEGAL: La informacion contenida en este mensaje y cualquier documento
adjunto en el mismo es confidencial, puede estar legalmente protegida y esta
dirigida solamente al destinatario. La publicacion, uso, distribucion,
impresion o copia no autorizada del contenido de este mensaje, esta
estrictamente prohibida y puede ser ilegal. Si Vd. ha recibido este mensaje por
error, le rogamos destruya el mensaje y lo notifique al remitente o llame al
telefono (+34) 91 556 92 62.
DISCLAIMER: The information contained in this message and any attached document
is confidential, covered by law and intended solely for the recipient. The
distribution, print, publication, unauthorised copy and / or use of the message
content is strictly forbidden and could be deemed illegal. If you are not the
intended recipient of this message, we request that you destroy it and notify
the sender either in writing or by calling ++34 91 556 92 62.