[Webtest] Asynchronous requests: how to track?

Andrew Sickorsky andrew.sickorsky@texunatech.com
Thu, 30 Aug 2007 14:53:18 +0400


This is a multi-part message in MIME format.
--------------090705060600010505020005
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi, Marc!
Thanks for the answer. But it seems that this didn't work for me. So, 
I've included code:
    <groovy>
        import 
com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController
        step.context.webClient.ajaxController = new
            NicelyResynchronizingAjaxController()
    </groovy>

The text code is:
    <clickElement 
xpath="//ul[@class='dashboard-icons']/li[@class='import_excel']"/>
    <setFileField 
xpath="//div[@id='import-excel']//input[@class='field']" 
fileName="${analysis-test-web.dir}/testdata/${excel.name}"/>
    <clickElement 
xpath="//div[@id='import-excel']//input[@class='upload-button']"/>
    <retry maxcount="40" description="wait while spreadsheet is importing">
        <sleep seconds="6"/>
          <not>
            <verifyText text="Please wait while your feed is being 
imported."/>
          </not>
        <sleep seconds="6"/>
    </retry>
    <verifyText text="Your data have been successfully imported."/>
    <clickElement xpath="//div[@class='buttons']/input[@alt='Close']"/>

but this All nested steps 'retried without success'. Total time for 
uploading: 40*60=240 seconds = 4 minutes is enough for testing s/s. I've 
tested this with 'Seconds' parameter equal to '30' (30*40 = 1200 
seconds) but result remains the same.
> Hi Andrew,
>
> can you try this (with a recent build containing HtmlUnit 1.13):
>
> <groovy>
> import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController
> step.context.webClient.ajaxController = new
> NicelyResynchronizingAjaxController()
> </groovy>
>
> this will be the default setting for WebTest... once I've found time for it.
>
> More about the motivation of this resynchronization:
> http://mguillem.wordpress.com/2007/07/24/htmlunit-re-synchronize-ajax-calls-for-simple-deterministic-test-automation/
>
> Marc.
>   


--------------090705060600010505020005
Content-Type: text/x-vcard; charset=utf-8;
 name="andrew.sickorsky.vcf"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="andrew.sickorsky.vcf"

begin:vcard
fn:Andrew Sickorsky
n:Sickorsky;Andrew
org:Texuna Tech Ltd.
adr;dom:;;Magistralnaya street, 5 - 33;Moscow
email;internet:andrew.sickorsky@texunatech.com
title:Tester
tel;work:+7 495 9809067
tel;cell:+7 909 9070328
x-mozilla-html:TRUE
url:www.texunatech.com
version:2.1
end:vcard


--------------090705060600010505020005--