Hi Friends,
I hope you might have the checkpoints to verify the tests.
You can get the result of checkpoint as True or False, in variable.
And if you get False, just increase the "iFailCount" variable with ONE.....
and continue.
You can do that as below.....
*Dim iFailCount
VarCheck = Dialog("Login").WinEdit("Agent Name:").Check (CheckPoint("Agent
Name:"))
'Here you will get pass fail of your checkpoint......
''Remember to parenthesisise your checkpoint Object..........
**(CheckPoint("Agent
Name:")), Otherwise it will give you error.*
*PassFailCount (iFailCount, VarCheck )
Function PassFailCount (Count, VarCheck)
If VarCheck = "False" Then
Count = Count + 1
End Function*
On Wed, Oct 21, 2009 at 10:03 AM, 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/
>
>
> >
>
--
BR.
Saurabh Gupta
Mob. +91-9663304288
-------------------
I have not failed, I've just found 10000 ways that won't work. Thomas A.
Edison
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---