SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Sep 2006
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to change the environment setting \'TestDir\'

    Hi all,

    In the settings there is an option in the Environments called 'TestDir'. This is the default location to store the results of a testrun.

    I want to change this default. But, in the settings screen it is nog possible to change.

    How can I change this setting?

  2. #2
    Senior Member
    Join Date
    Dec 2006
    Location
    Germany, Dresden
    Posts
    1,536
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change the environment setting \'TestDir\'

    you can change the folder of run results before starting your test by selecting run result folder in dialog.

    second way is using QTP Automation Object Model (help available via QTP and "F1" key), search for "RunResultsOptions" and "Resultslocation"
    http://qcmt.pc-polis.de

    de omnibus dubitandum

    For all Questions: Please be sure to take a look at the QTP Manual before posting any Questions, thanks for doing this

  3. #3
    Junior Member
    Join Date
    Sep 2006
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to change the environment setting \'TestDir\'

    The folder which can be set before starting a test changes everytime. The system value of TestDir is the default setting. So that is the reason I want to change this default setting, so that I don't have to change this value everytime.

    The use of RunResultsOptions is not possible in the code of QTP. It cannot be changed when running a test.

  4. #4
    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 change the environment setting \'TestDir\'

    It's stored in the registry:

    Copy this to a VBScript file, amend tDIR and run it to change the default tests directory:

    '================================================= ===============================
    sHiveAbbrv = "HKLM"
    sAssignmentType = "REG_SZ"

    tDir = "C:\QTP\MyDirectory" ' This is where you want default tests directory to be

    Set oWshell = CreateObject("WScript.Shell")
    sRegKeyPath = "SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\"
    sRegValueName = "TestsDirectory"
    sAssignmentValue = tDir
    sRegCreatePathString = Trim(sHiveAbbrv) & "\" & Trim(sRegKeyPath) & "\" & Trim(sRegValueName)
    oWshell.RegWrite sRegCreatePathString, sAssignmentValue, sAssignmentType
    Set oWShell = Nothing
    '================================================= ============================


    Mark Smith.

  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 change the environment setting \'TestDir\'

    Addendum to above post, for later version of QTP the sRegKeyPath will require changing to the HP install location of MicTest e.g.

    SOFTWARE\HP\QuickTest Professional\MicTest

    Or similar

    Mark.

 

 

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 01:37 AM.

Copyright BetaSoft Inc.