[Webtest] Error in my first test

Moreno Crespo, Ana Isabel webtest@lists.canoo.com
Thu, 12 Jan 2006 11:40:53 +0100


Hello.

Thanks for your help

I have done you said me and this is the result.

C:\herramientas_test\Canoo\build\pruebas>webtest -buildfile =
simpletest.xml
"java.exe" -Xms64M -Xmx256M -cp
"C:\herramientas_test\Canoo\build\bin\..\lib\run
time\ant-launcher.jar"
-Dant.library.dir=3D"C:\herramientas_test\Canoo\build\bin\.
.\lib\runtime" org.apache.tools.ant.launch.Launcher -lib
"C:\herramientas_test\C
anoo\build\bin\..\lib\build;C:\herramientas_test\Canoo\build\bin\..\lib\=
buil
d\cl
over.jar" -buildfile simpletest.xml
Buildfile: simpletest.xml
Trying to override old definition of task sleep

main:
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Canoo Webtest:
R_1115.
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - No =
configuration
defined
, using default configuration.
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: =
null
"[impli
ct setup step]" (1/3)
  [webtest]  INFO (com.canoo.webtest.steps.Setup) - Surfing with =
browser
Mozilla
/4.0 (compatible; MSIE 6.0b; Windows 98)
  [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: =
invoke
"Efic
az" (2/3)
  [webtest]  INFO =
(com.canoo.webtest.steps.request.AbstractTargetAction) -
-> go
toTarget by URL: http://10.252.131.102:8081/eficaz
  [webtest]  INFO (com.canoo.webtest.steps.request.TargetHelper) - =
getting
respo
nse for url: http://10.252.131.102:8081/eficaz
  [webtest]  INFO (org.apache.commons.httpclient.HttpMethodDirector) -
Redirect
requested but followRedirects is disabled
  [webtest] ERROR (com.canoo.webtest.steps.request.TargetHelper) -
ScriptExcepti
on: enclosed exception was "null"
  [webtest]  INFO (com.canoo.webtest.steps.Step) - Exception thrown =
from
this cl
ass: com.canoo.webtest.engine.StepFailedException
  [webtest]  INFO (com.canoo.webtest.steps.Step) - Message was: =
Step[invoke
"Efi
caz" (2/3)]: Script error executing at: invoke
  [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Test report
successfully
 created.

BUILD SUCCESSFUL
Total time: 4 seconds=20

<testresult endtime=3D"Thu Jan 12 11:31:45 CET 2006"
location=3D"C:\herramientas_test\Canoo\build\pruebas\simpletest.xml:7:"
starttime=3D"Thu Jan 12 11:31:42 CET 2006" successful=3D"no"
testspecname=3D"myTest">
- <config>
  <parameter name=3D"protocol" value=3D"http" />=20
  <parameter name=3D"summary" value=3D"yes" />=20
  <parameter name=3D"saveresponse" value=3D"yes" />=20
  <parameter name=3D"haltonerror" value=3D"no" />=20
  <parameter name=3D"resultfile" value=3D"results.xml" />=20
  <parameter name=3D"port" value=3D"80" />=20
  <parameter name=3D"failureproperty" value=3D"webtest.failure" />=20
  <parameter name=3D"showhtmlparseroutput" value=3D"yes" />=20
  <parameter name=3D"resultpath"
value=3D"C:\herramientas_test\Canoo\build\pruebas\webtest-results" />=20
  <parameter name=3D"host" value=3D"localhost" />=20
  <parameter name=3D"haltonfailure" value=3D"no" />=20
  <parameter name=3D"basepath" value=3D"null" />=20
  <parameter name=3D"saveprefix" value=3D"response" />=20
  <parameter name=3D"errorproperty" value=3D"webtest.error" />=20
  </config>
- <results>
- <step>
  <parameter name=3D"description" value=3D"Eficaz" />=20
  <parameter name=3D"url" value=3D"http://10.252.131.102:8081/eficaz" =
/>=20
  <parameter name=3D"method" value=3D"GET" />=20
  <parameter name=3D"stepType" value=3D"invoke" />=20
- <result>
  <failed duration=3D"2547" />=20
  </result>
  </step>
  <failure message=3D"com.canoo.webtest.engine.StepFailedException:
Step[invoke "Eficaz" (2/3)]: Script error executing at: invoke, Step:
InvokePage at =
C:\herramientas_test\Canoo\build\pruebas\simpletest.xml:11:
with (description=3D"Eficaz", =
url=3D"http://10.252.131.102:8081/eficaz",
method=3D"GET", stepType=3D"invoke")" />=20
  </results>
  </testresult>
  </summary>

Please, help!!!

-----Mensaje original-----
De: Marc Guillemot [mailto:mguillemot@yahoo.fr]=20
Enviado el: mi=E9rcoles, 11 de enero de 2006 22:50
Para: webtest@lists.canoo.com
Asunto: Re: [Webtest] Error in my first test

Hi,

it looks like your page contains js that isn't yet understood by =
htmlunit
(the underlying "browser"). Can you set the log to the debug level =
(normally
in lib/log4j.properties) and post the log output as well as stack trace =
of
the eception.

Your use of setInputField and clickButton seems to be correct.

Marc.

Moreno Crespo, Ana Isabel wrote:
> Hello.
>=20
> I have installed canoo and i=B4m creating my first test.
>=20
> It=B4s very simple:
>=20
> <project name=3D"SimpleTest" basedir=3D"." default=3D"main">
>   <property name=3D"webtest.home"
location=3D"C:\herramientas_test\Canoo\build"
> />=20
>   <import file=3D"${webtest.home}/lib/taskdef.xml" />
> - <target name=3D"main">
> - <webtest name=3D"myTest">
> - <steps>
>   <invoke description=3D"Eficaz" =
url=3D"http://10.252.131.102:8081/eficaz" />=20
>   </steps>
>   </webtest>
>   </target>
>   </project>
>=20
> And my result is this
>=20
>   [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Canoo =
Webtest:
> R_1115.
>   [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - No=20
> configuration defined , using default configuration.
>   [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:=20
> null "[impli ct setup step]" (1/3)
>   [webtest]  INFO (com.canoo.webtest.steps.Setup) - Surfing with=20
> browser Mozilla /4.0 (compatible; MSIE 6.0b; Windows 98)
>   [webtest]  INFO (com.canoo.webtest.steps.Step) - >>>> Start Step:=20
> invoke "Efic az" (2/3)
>   [webtest]  INFO=20
> (com.canoo.webtest.steps.request.AbstractTargetAction) -
> -> go
> toTarget by URL: http://10.252.131.102:8081/eficaz
>   [webtest]  INFO (com.canoo.webtest.steps.request.TargetHelper) -=20
> getting respo nse for url: http://10.252.131.102:8081/eficaz
>   [webtest]  INFO (org.apache.commons.httpclient.HttpMethodDirector) =
-=20
> Redirect requested but followRedirects is disabled
>   [webtest] ERROR (com.canoo.webtest.steps.request.TargetHelper) -=20
> ScriptExcepti
> on: enclosed exception was "null"
>   [webtest]  INFO (com.canoo.webtest.steps.Step) - Exception thrown=20
> from this cl
> ass: com.canoo.webtest.engine.StepFailedException
>   [webtest]  INFO (com.canoo.webtest.steps.Step) - Message was:=20
> Step[invoke "Efi caz" (2/3)]: Script error executing at: invoke
>   [webtest]  INFO (com.canoo.webtest.ant.WebtestTask) - Test report=20
> successfully  created.
>=20
> BUILD SUCCESSFUL
> Total time: 4 seconds
>=20
> What happen?
> Please, i need your help!!
>=20
> If i want to write in a textbox and click in a button:
>=20
>      <setInputField description=3D"Set the input field"
> 		name=3D"login.username"
>       	value=3D"as" />
> 		<clickButton description=3D"Submit the simple form"
> 	     name=3D"login.buttonEntrar" />
>=20
> Is it correct?
>=20
> Thank you.
>=20
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>=20

_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest