Mailing list - Entries of 2005


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [qftestJUI] Timeout attribute versus Wait for absence attribute


  • Subject: Re: [qftestJUI] Timeout attribute versus Wait for absence attribute
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Mon, 08 Aug 2005 08:42:02 -0000

Hi Raphael,

Raphael Neu <raphael.neu@?.com> writes:

> Hi Greg,
>
> thanks fo your response.
>
> With your response I understand that theorically, it should wait the
> timeout to expire before proceding to next node if the dialog does not
> appear.
>
> However my concern is that the Timeout attribute is *NOT* taken into
> account if I check "wait for absence" checkbox. In other words,
> QFTestJUI DOESN'T wait 5 seconds before proceding to next node, but
> jumps to the next step immediately.

That's because the dialog is not there, so the condition for the check
is is met immediately. The timeout would come into effect if - at the
time the wait for absence is executed - the dialog is showing. In that
case qftest would wait until either the dialog disappears or the
timeout is exceeded.

Your interpretation of wait for absence is "Make sure that the dialog
does not appear for the duration given in timeout", but that's not the
case.

Best regards,
    Greg

>
> regards,
> Raphael
>
> On 07 Aug 2005 14:03:45 +0200, Gregor Schmid <Gregor.Schmid@?.de> wrote:
> >
> > Hello Raphael,
> >
> > you need to do it the other way round.
> >
> > The timeout in a check is a maximum value. If your dialog only appears
> > after a second or two, the check for absence will succeed immediately!
> >
> > Instead, you need to wait for the dialog to appear. Use a normal wait
> > for component node with "Absence" unchecked as follows:
> >
> > + Try
> >  + Wait for component (error dialog)
> >  + Throw Exception "Error Dialog Appeared" (or just log an error and
> >                                             close the dialog)
> >  + Catch ComponentNotFoundException (everything fine)
> >
> > Of yourse you'll incur the maximum delay for the timeout in case the
> > dialog doesn't appear, but in that situation, that can't be helped.
> >
> > Best regards,
> >    Greg
> >
> > Raphael Neu <raphael.neu@?.com> writes:
> >
> > > Hi,
> > >
> > > I'am using version version 1.08.2-p4. I use some "Wait for component"
> > > nodes in order to test the absence of an error modal dialog. I set the
> > > Timeout attribute to 5000 milliseconds and check the "Wait for
> > > absence" checkbox. Note that the "Wait for component" node is alone in
> > > a try-catch[component found exception] statement.
> > >
> > > As the error dialog take some time to appear (1-2 seconds), I expected
> > > that the node will wait 5 seconds before deciding that component did
> > > not appear and continue to the next step.
> > > However, it is not the behavior I experience there. the next node is
> > > called immediately. As a workaround, I use the "delay before"
> > > attribute, but the waste of time (5 seconds when error could appear in
> > > 2 seconds) may become a problem as I have a bunch of such test to do.
> > >
> > > There is no word on interaction between Timeout and Wait for absence
> > > attributes in the help, and I didn't found something similar in the
> > > mailing list archive. That's why I am asking the question:
> > > Is "Timeout" attribute ignored if "Wait for absence" attribute set to
> > > true?  What is the theorical behavior in my case?
> > >
> > > thanks in advance,
> > > Raph

--
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876


Videos Downloads Documentation Buy Free Trial