[Webtest] WebTest digest
Francisco Javier Martin Gutierrez
francisco-javier.martin@thalesgroup.com
Wed, 11 Apr 2007 18:01:45 +0200
Hello:
I have a problem when i clickButton over a script java page.
Previous response is: .../NuevoCaso.do=20
and next response is: .../NuevoCaso.do
I think that I need to store header properties or to enable
followRedirects because I obtain this info message:=20
[invoke] INFO (com.canoo.webtest.steps.request.TargetHelper) - getting
response for url: http://espinete:7783/sauss
[invoke] INFO (org.apache.commons.httpclient.HttpMethodDirector) - =
Redirect
requested but followRedirects is disable
And there is my code:
<?xml version=3D"1.0" encoding=3D"ISO-8859-1" ?>
<!--PruebaPc000.xml
flujo que reproduce los siguientes casos-->
=09
<!DOCTYPE project SYSTEM "WebTest.dtd"[
<!ENTITY config SYSTEM "config.xml">
<!ENTITY login SYSTEM "file:modules/login.xml">
<!ENTITY RCC SYSTEM "file:modules/RCC.xml">
<!ENTITY tareas SYSTEM "file:modules/Tareas.xml">
<!ENTITY avisos SYSTEM "file:modules/Avisos.xml">=20
<!ENTITY apertura SYSTEM "file:modules/Apertura.xml">
<!ENTITY aperturaCaso SYSTEM "file:modules/AperturaCaso.xml">
<!ENTITY archivador SYSTEM "file:modules/Archivador.xml">=20
<!ENTITY estadisticas SYSTEM "file:modules/Estadisticas.xml">
<!ENTITY mantenimientos SYSTEM "file:modules/Mantenimientos.xml"> =20
<!ENTITY dependencia SYSTEM "file:modules/Dependencia.xml">
<!ENTITY historicos SYSTEM "file:modules/Historicos.xml"> =20
<!ENTITY rSociales SYSTEM "file:modules/RecursosSociales.xml">
<!ENTITY dApertura SYSTEM "file:modules/DatosApertura000.xml">
]>
<project name=3D"SAUSS" basedir=3D"." default=3D"main">
=09
<property name=3D"webtest.home" location=3D"C:/webtest" />
<property name=3D"contentType" value=3D"" />
<import file=3D"${webtest.home}/lib/taskdef.xml"/>
<!--USUARIO login-->
<property name=3D"USUARIO" value=3D"MARIA" />
<!--DATOS APERTURA-->
<property name=3D"nombre" value=3D"astro" />
<property name=3D"apellidos" value=3D"0" />
<target name=3D"main">
<webtest name=3D"PruebaPc000">
=20
<!--Archivo de configuracion-->
<config description=3D"respuesta del host, reporting and logging"
host=3D"espinete" port=3D"7783" protocol=3D"http" basepath=3D""
autorefresh=3D"true"
summary=3D"true" saveresponse=3D"true" saveprefix=3D"PruebaPc000"
resultpath=3D"${webtest.home}/SAUSS/results" =
resultfile=3D"resultados.xml"
>
<header name=3D"User-Agent" value=3D"MSIE 6.0b" />
<header name=3D"Connection" value=3D"Keep-Alive"/>
<header name=3D"Cache-Control" value=3D"no-cache"/>
</config>
<steps>
<enableJavaScript description=3D"Se habilita la ejecucion de
scripts java"
enable=3D"true" /> =20
&login;
&RCC;
&apertura;
&aperturaCaso;
=09
<!--DatosApertura000-->
<setInputField description=3D"set user NOMBRE=3D
${nombre}"
name=3D"nombre" value=3D"${nombre}" />
<setInputField description=3D"set user APELLIDOS=3D
${apellidos}"
name=3D"apellidos" value=3D"${apellidos}" />=09
<setCheckbox description=3D"Sin limite resultados"
name=3D"sinLimiteResultados" value=3D"S"/>
<verifyCheckbox description=3D"Sin limite resultados"
name=3D"sinLimiteResultados" checked=3D"true" />
<clickButton description=3D"Click the submit button
5: botonBuscar"
name=3D"botonBuscar" />
=09
=20
<!--NO COINCIDENCIA HISTORIA SOCIAL-->
<!--NO habia una HS anterior creada: Apertura de Nueva
Historia Social-->
<verifyText description=3D"Texto presente 2:
Nueva historia social"
text=3D" Nueva historia social" />=09
<verifyText description=3D"Texto presente 2: No se
ha encontrado"
text=3D"No se ha encontrado" />
<verifyText description=3D"Texto presente 2: Pulse
'Aceptar' si desea proceder a dar de alta una Historia Social asociada a
este nuevo Titular"
text=3D"Pulse 'Aceptar' si desea proceder a dar de
alta una Historia Social asociada a este nuevo Titular" />=09
<clickButton description=3D"Click the submit button
6: botonAceptar"=09
name=3D"botonAceptar" /> =09
=09
<verifyText description=3D"Texto presente 1:
Introduzca los datos del Titular de la H.S. que desea crear"
text=3D"Introduzca los datos del Titular de la H.S.
que desea crear" />
=09
<!--Deberia pasar estos 2 pasos y fallar en el anterior-->
<verifyText description=3D"Texto presente 3:
Cabecera de la historia social"
text=3D"Cabecera de la historia social" />
<verifyText description=3D"Texto presente: Datos
generales"
text=3D"Datos generales" />=09
=09
=09
</steps>
</webtest>
</target>
</project>
Do you have any idea about what happens?=20
Thanks.
Francisco Javier Mart=EDn=20
AVISO LEGAL: La informacion contenida en este mensaje y cualquier documen=
to adjunto en el mismo es confidencial, puede estar legalmente protegida =
y esta dirigida solamente al destinatario. La publicacion, uso, distribuc=
ion, impresion o copia no autorizada del contenido de este mensaje, esta =
estrictamente prohibida y puede ser ilegal. Si Vd. ha recibido este mensa=
je 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 do=
cument is confidential, covered by law and intended solely for the recipi=
ent. 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.