'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/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
