[Webtest] Error in my first test
Marc Guillemot
webtest@lists.canoo.com
Thu, 12 Jan 2006 19:20:19 +0100
Please don't start a second discussion for the same problem.
The provided log doesn't provide aditional information. Have you really
set the log level to debug?
What js code does your page contain? Can you try to reduce the js in it
to find which part of the js code causes the problem?
Marc.
Moreno Crespo, Ana Isabel wrote:
> 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="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
>
> <testresult endtime="Thu Jan 12 11:31:45 CET 2006"
> location="C:\herramientas_test\Canoo\build\pruebas\simpletest.xml:7:"
> starttime="Thu Jan 12 11:31:42 CET 2006" successful="no"
> testspecname="myTest">
> - <config>
> <parameter name="protocol" value="http" />
> <parameter name="summary" value="yes" />
> <parameter name="saveresponse" value="yes" />
> <parameter name="haltonerror" value="no" />
> <parameter name="resultfile" value="results.xml" />
> <parameter name="port" value="80" />
> <parameter name="failureproperty" value="webtest.failure" />
> <parameter name="showhtmlparseroutput" value="yes" />
> <parameter name="resultpath"
> value="C:\herramientas_test\Canoo\build\pruebas\webtest-results" />
> <parameter name="host" value="localhost" />
> <parameter name="haltonfailure" value="no" />
> <parameter name="basepath" value="null" />
> <parameter name="saveprefix" value="response" />
> <parameter name="errorproperty" value="webtest.error" />
> </config>
> - <results>
> - <step>
> <parameter name="description" value="Eficaz" />
> <parameter name="url" value="http://10.252.131.102:8081/eficaz" />
> <parameter name="method" value="GET" />
> <parameter name="stepType" value="invoke" />
> - <result>
> <failed duration="2547" />
> </result>
> </step>
> <failure message="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="Eficaz", url="http://10.252.131.102:8081/eficaz",
> method="GET", stepType="invoke")" />
> </results>
> </testresult>
> </summary>
>
> Please, help!!!
>
> -----Mensaje original-----
> De: Marc Guillemot [mailto:mguillemot@yahoo.fr]
> Enviado el: miércoles, 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.
>>
>>I have installed canoo and i´m creating my first test.
>>
>>It´s very simple:
>>
>><project name="SimpleTest" basedir="." default="main">
>> <property name="webtest.home"
>
> location="C:\herramientas_test\Canoo\build"
>
>>/>
>> <import file="${webtest.home}/lib/taskdef.xml" />
>>- <target name="main">
>>- <webtest name="myTest">
>>- <steps>
>> <invoke description="Eficaz" url="http://10.252.131.102:8081/eficaz" />
>> </steps>
>> </webtest>
>> </target>
>> </project>
>>
>>And my result is this
>>
>> [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
>>
>>What happen?
>>Please, i need your help!!
>>
>>If i want to write in a textbox and click in a button:
>>
>> <setInputField description="Set the input field"
>> name="login.username"
>> value="as" />
>> <clickButton description="Submit the simple form"
>> name="login.buttonEntrar" />
>>
>>Is it correct?
>>
>>Thank you.
>>
>>_______________________________________________
>>WebTest mailing list
>>WebTest@lists.canoo.com
>>http://lists.canoo.com/mailman/listinfo/webtest
>>
>
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>