Mailingliste - Einträge 2005


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

Re: [qftestJUI] Question about error handling


  • Subject: Re: [qftestJUI] Question about error handling
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Tue, 28 Jun 2005 11:02:02 -0000

Hello Alex,

that problem should by handled using Try/Catch, not If/Else, e.g.

+ Try
  + Wait for component
  + positive steps
  + Catch ComponentNotFoundException
    + negative steps

You just have to be careful that your positive steps don't cause a
ComponentNotFoundException that would be caucht inadvertently in the
Catch block. If the steps are complex, just set a variable and put an
IF/Els block afterwards, e.g.

+ Try
  + Wait for component
  + set var true
  + Catch ComponentNotFoundException
    + set var false
    + negative steps
+ If var is true
  + positive steps

Best regards,
    Greg

"Burlyga, Alex" <ABurlyga@?.com> writes:

> Thanks for the quick reply! 1 worked for me...
>
> Another 2 questions on the same topic:
>
> I'm trying to check if certain window exist if yes then replay some sequense
> if not then just kill the app
> So logical pick is is "if" node; 2 issues with that:
> 		1. what do I put into condition field? Id of the window?
>             2. can I use check node in there?
>
> Thanks,
>
> Alex.
>
> -----Original Message-----
> From: Gregor Schmid [mailto:Gregor.Schmid@?.de]
> Sent: Thursday, June 23, 2005 8:52 AM
> To: qftestJUI-list@?.de
> Cc: Burlyga, Alex
> Subject: Re: [qftestJUI] Question about error handling
>
>
> Hello Alex,
>
> 1.) The easiest way is to set the "Error level" attribute of the Catch node
> to "Error". This will cause it to handle the exception, but still report it
> as an error with associated screenshot and everything.
>
> 2.) Use a "Server script" node with method calls like like
>
> rc.logMessage("message...")
> rc.logWarning("message...")
> rc.logError("message...")
> rc.check(condition, "message...")
>
> Best regards,
>     Greg
>
> "Burlyga, Alex" <ABurlyga@?.com> writes:
>
> > Hi,
> >
> > I'm evaluating qftestJUI, and I run in into couple of issues.
> >
> > 1. SUT client is not killed if error encounterd.
> > 	I have following startup procedure:
> > 		a. Start java SUT
> > 		b. Wait until client connects
> > 		c. Wait until component
> >       So I introduced an error  during start up so c. above times out.
> >       I see error logged into run-log with all the details I need, but if
> I
> >       try to run the test again qftest complains that client already
> > connected.
> >
> > 	I decided to go around it and put above start-up into try/catch
> > construct.
> > 	Now I have:
> > 		a. Try
> > 			aa. Start java SUT
> >                   ab. Wait until client connects
> >                   ac. Wait until component
> > 		b. Catch TestException
> > 			ba. Kill the app
> > 	Which worked great, but now I lost nice log with screenshot of the
> > error that app
> >       produced while starting. Which brings me to another issue
> >
> > 2. I there any way to insert nodes into the logrun?
> >
> > Other then that great testing tool:)
> >
> > Alex.

--
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 Dokumentation Kaufen Gratis Testen