SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Member
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to stop the test run programmatically?

    I know that there are commands like ‘Exit Run’, Exit Test’, ‘Exit Component’…etc to stop the test execution.
    What I am looking for is while running tests to stop the test run either click Stop button/ choose Test>Stop/ hit F4 key and the test result window opens. In test result window the result state will be ‘Not completed’.
    Pls let me know how to achieve ‘Not completed’ status of test run programmatically.
    QANami

  2. #2
    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: How to stop the test run programmatically?

    Yes, you listed it:

    ExitRun.

    Mark Smith.

  3. #3
    Member
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to stop the test run programmatically?

    ExitRun will quit the test but not display the test result summary as 'Not completed'
    What I am looking for is Result window Test Result Summary should display as 'Not Completed'.
    QANami

  4. #4
    Member
    Join Date
    Oct 2005
    Posts
    352
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to stop the test run programmatically?

    you can try getting the qtp application object and try sending the F4 key ... I am not sure how the code will be but some thing on similar lines ....
    set ws = CreateObject("WScript.shell")
    ws.Sendkeys "{F4}"

    'to get the qtp allication object
    set qtApp = getObject("","QuickTest.Application")

    I am not sure how u sendkeys as this is not supported here ..

  5. #5
    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: How to stop the test run programmatically?

    Reporter.ReportEvent micWarning, "Warning Message","Test stopped programmatically by script, run not completed"
    ExitRun

    Mark Smith.

  6. #6
    Member
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to stop the test run programmatically?

    I got solution from my friend by creating Mercury Device Replay object and setting the focus on QTP application and passing F4 key value.
    QANami

  7. #7
    Member
    Join Date
    Oct 2005
    Posts
    352
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to stop the test run programmatically?

    Good!!
    Do you mind sharing the code for the same? I too need this
    Thanks

  8. #8
    Member
    Join Date
    Jun 2006
    Location
    Bangalore, India
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to stop the test run programmatically?

    Make use of the following code for stopping the test.

    Set obj = CreateObject("Mercury.DeviceReplay")
    Set qtApp = CreateObject("QuickTest.Application")
    qtApp.Visible = True
    obj.PressKey 62
    QANami

  9. #9
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to stop the test run programmatically?

    I am using QTP 8.2 and find no documentation describing the Mercury.DeviceReplay automation object. Some questions:

    1. What version of QTP are you using?

    2. Did you have to download and register this COM automation object in order to use it?

    3. Do you have a HELP file or doc describing the supported automation object properties and methods?

    -Thanks, Terry Horwath

    P.S. It seems curious to me that this capability is not supported by the QTP automation object. When I looked in that help file I found the DeviceReplay Property, but it is part of the Java Addin. But I have learned, based on Windows vbScript automation objects, not to assume that two similar names have any relationship.

  10. #10
    Member
    Join Date
    Oct 2005
    Posts
    352
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to stop the test run programmatically?

    Thanks QANami

 

 
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 11.54%
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 03:38 AM.

Copyright BetaSoft Inc.