The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> Micro Focus/Compuware QARun

Pages: 1
Beginner15
Newbie


Reged: 04/16/09
Posts: 2
Reg Error Handling
      #563212 - 04/16/09 08:14 AM

I am a novice to QARun and require help regarding error handling. In the Attach function i have used a model object for which there is no visible window. So while testing the code should throw runtime error,but insteads it keeps searching or waiting for the model object or the window to which it has to be attached.

Kindly can somebody tell why this code keep searching for the model object or window to be attached and doesn't throw a runtime error message.

I have copy pasted the sample code that i am testing

Function Main
On Error Call OnErrorHandler

ret = Attach( "Sans titre - Bloc-notes MainWindow" )

ret = Type( "want to check nested loops" )

End Function ; Main


Function OnErrorHandler
if ret =1
Resume Next ; Continue On Error
else
logcomment ("Window doesn't exist")
return
endif

End Function

Thanks in advance for the help


Post Extras: Print Post   Remind Me!   Notify Moderator  
chiefwiggum
Active Member


Reged: 06/03/02
Posts: 713
Loc: farmington hills, MI, US
Re: Reg Error Handling [Re: Beginner15]
      #563303 - 04/16/09 02:39 PM

It's been a while since I used QARun but if you stop the execution and look at your log do you see a bunch of logcomments with "Window doesn't exist"? I would expect so, since you are just returning which will likely try the attach again and again and again. I believe that there is an end or exit method that you would want to call instead.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Beginner15
Newbie


Reged: 04/16/09
Posts: 2
Re: Reg Error Handling [Re: chiefwiggum]
      #563410 - 04/17/09 01:24 AM

When i stop the execution of the script manually,then in the log window i dont find the log comment like "Window doesn't exist".I have just two log messages- One is 'Start' and other is 'Abort' and the result of the operation is 'Fail'.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:  Jim Brennan, AJ, DSquared 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 3689

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5