25 Apr 2012 18:00
Re: Asynchronous Calls handling _ flickering scenarios
If you are using jbehave-web and its Selenium integration - please make sure you are using Selenium's Wait functionality.
For other asynchronous processing, I prefer to have a polling step, much like Mauro described but I'd use it to refer to what results you are polling for.
When the user makes asynchronous call
And the call completes (within 5 seconds)
Then ...
And the call completes (within 5 seconds)
Then ...
Replacing that with what the "call completes" actually means. You will typically implement that step with a polling method.
Brian
----- Original message -----
From: Mauro Talevi <mauro.talevi-hQ+s5KbX5YmGglJvpFV4uA@public.gmane.org>
Subject: Re: [jbehave-user] Asynchronous Calls handling _ flickering scenarios
Date: Wed, 25 Apr 2012 17:36:44 +0200
Hello,
no, there is nothing built-in for this, as users can implement (typically in the step executing the call or in a separate step) their own sleep patterns using the standard JDK TimeUnit functionality.
Implementing a separate step is more readable and communicative, thus preferable. E.g.
When the user makes asynchronous call
And the users waits for 5 seconds
Then ...
Cheers
On 25/04/2012 17:23, Bhuvnesh Pratap wrote:
no, there is nothing built-in for this, as users can implement (typically in the step executing the call or in a separate step) their own sleep patterns using the standard JDK TimeUnit functionality.
Implementing a separate step is more readable and communicative, thus preferable. E.g.
When the user makes asynchronous call
And the users waits for 5 seconds
Then ...
Cheers
On 25/04/2012 17:23, Bhuvnesh Pratap wrote:
Hello people,I have this scenario in my mind where one of the step makes an asynchronous call at theGUI (this call is supposed to persist some data in to the database ) and then executes thenext step present in the scenario which actually makes some DB call over the data thathas been just changed by the previous asych. call .In such a case we would like to implicitly wait for next step to begin execution or wait till someevent happens . Do we have such a feature built in our JBehave to take care of such a situation ?Thanks,Bhuvnesh Pratap
RSS Feed