SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    What to know the best way to calculate Transaction

    Hi All,

    I have to calculate transaction time between click of the button and display of the screen:

    Browser("Google").Page("Google").WebEdit("q").Set q
    Browser("Google").Page("Google").WebButton("Google Search").Click
    Start=MercuryTimers("Timer1").Start
    If Browser("Google").WebElement("Web").Exist Then
    Stop1=MercuryTimers("Timer1").Stop
    End If
    Transtime=Stop1-Start
    msgbox Transtime

    The time differs for the same data.Please could any one suggest a accurate way to calculate time

    Thanks in advance

  2. #2
    Member
    Join Date
    Mar 2007
    Posts
    250
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: What to know the best way to calculate Transaction

    Hi,

    you can use the now function and later use the datediff function to calculate the time. But as this is web application the time may differ for the same data because there are other factors as well which are involved in this case like the network traffic etc. But the difference should not be an alarming one.

  3. #3
    Member
    Join Date
    Dec 2007
    Posts
    36
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: What to know the best way to calculate Transaction

    Hi
    You can use Start and End Transaction object of QTP.

    Browser("Google").Page("Google").WebEdit("q").Set q
    Browser("Google").Page("Google").WebButton("Google Search").Click

    Services.StartTransaction "test"


    Browser("Google").WebElement("Web").Sync
    Services.StartTransaction "test"

    This transaction time will be displayed in the report generated.
    Thanks
    Shobhit Gupta

  4. #4
    Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: What to know the best way to calculate Transaction

    Thank u manav and Automation_QA

    Browser("Google").Page("Google").WebEdit("q").Set q
    Browser("Google").Page("Google").WebButton("Google Search").Click

    a=Services.StartTransaction "test"


    Browser("Google").WebElement("Web").Sync
    d=Services.EndTransaction "test"

    msgbox d

    It displays null...

  5. #5
    Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: What to know the best way to calculate Transaction

    Sync method is for "page' and browser objects not for webelement i suppose

  6. #6
    Member
    Join Date
    Mar 2007
    Posts
    250
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: What to know the best way to calculate Transaction

    you will get the number of seconds in the Test Results if you are using the Services object.

  7. #7
    Member
    Join Date
    Mar 2007
    Posts
    250
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: What to know the best way to calculate Transaction

    check the QTP help for more details and as said earlier you can also use the functions now() and datediff() to calculate the time. But I think each time you execute you will get different time values.

  8. #8
    Junior Member
    Join Date
    Jan 2008
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: What to know the best way to calculate Transaction

    I believe IBM Page Detailer Basic will helpful for you.. It is a freeware.. crosscheck the transaction time of QTP

    Thanks
    vishnu

  9. #9
    Senior Member
    Join Date
    Jun 2007
    Posts
    132
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: What to know the best way to calculate Transaction

    Manav now() and datediff would give time in seconds but i need in milliseconds

    Vishnu i read in IBM Page Detailer Basic forum that system becomes slower by installing

    Thanks both of you

  10. #10
    Moderator
    Join Date
    Sep 2001
    Location
    Doncaster, UK
    Posts
    5,788
    Post Thanks / Like
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: What to know the best way to calculate Transaction

    strtTran = Timer

    Browser("Google").Page("Google").WebEdit("q").Set q
    Browser("Google").Page("Google").WebButton("Google Search").Click
    Browser("Google").WebElement("Web").Sync

    endTran=Timer

    MsgBox endTran - strtTran

    Mark Smith.

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:18 PM.

Copyright BetaSoft Inc.