Hello sm! I don't think any built in method is there to catch error prior to the completion...but we can track it through error handling method..In this case total fails=number of times error is triggered.
On Wed, Oct 21, 2009 at 10:53 PM, SpaceMarine <[email protected]>wrote: > > hello, > > your example is pulling up the fails from the test's result .XML. that > isnt what im looking for. > > im looking for the number of errors (if any) in the *current* test > execution. that is, if the test recorded two fails halfway thru, id > like to get this number (2) just prior to the test finishing. > > is this possible? does any built-in QTP method keep track of this > while running? > > > thanks, > sm > > > > On Oct 20, 11:33 pm, Bibek Khatiwara <[email protected]> wrote: > > 'Hi sm..just you need to change the fpath to run this script;fpath is the > > 'location of test result folder ie.res1 in your Pc > > > > '============================= > > 'Author:Bibek Khatiwara > > 'Date:21/10/2009 > > 'Website:http://softwaretesting9.wordpress.com/ > > '============================= > > > > fpath="C:\Program Files\HP\QuickTest > > Professional\Tests\Custom_result\Test1\Res1\Report" > > Set oXML=CreateObject("MSXML.DomDocument") > > XMLpath=fpath &"\Results.xml" > > If oXML.Load(XMLpath) Then > > > > Set oHtmlTag = oXML.GetElementsByTagName("Summary") > > > > Set oTag = oHtmlTag(oHtmlTag.Length - 1) > > checkFail = oTag.getAttribute("failed") > > if Not checkFail=0 Then > > Msgbox "Failed" > > else > > Msgbox "Test completed without any fails" > > End If > > > > End if > > > > On Tue, Oct 20, 2009 at 9:42 PM, Dave Sorenson <[email protected] > >wrote: > > > > > > > > > > > > > Dim iFailCount > > > If iFailCount = 0 Then > > > Reporter.ReportEvent micPass, "Final Check", "Test completed > > > without any fails." > > > else > > > Reporter.ReportEvent micFail, "Final Check", "Test completed with > > > errors'&FailCount > > > End If > > > > > On Tue, Oct 20, 2009 at 11:10 AM, SpaceMarine < > [email protected]>wrote: > > > > >> hello, > > > > >> at the end of my test script id like to retrieve the number of "fails" > > >> that may have been raised via the test's checkpoints or via my code's > > >> 'Reporter.ReportEvent micFail' calls. then, if no fails were present > > >> ill report a new micPass. > > > > >> ex: > > > > >> Dim iFailCount > > >> 'iFailCount = ???? 'i need this part. > > > > >> If iFailCount = 0 Then > > >> Reporter.ReportEvent micPass, "Final Check", "Test completed > > >> without any fails." > > >> End If > > > > >> ...how does one do this? > > > > >> thanks, > > >> sm > > > > >> -- > > >> Dave Sorenson > > >> Owner > > >> DS Technical Solutions, LLC. > > >>http://dstechnicalsolutions.com > > > > >> Visit profile on Linked in > > >>http://www.linkedin.com/in/sorney > > > > -- > > Warm Regards, > > Bibek > > > > Hey! Catch me on:http://khateee.blogspot.com/- Hide quoted text - > > > > - Show quoted text - > > > -- Regards, Bibek Hey! Catch me on: http://khateee.blogspot.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -~----------~----~----~----~------~----~------~--~---
