SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Nov 2000
    Location
    Toronto, Ontario, Canada
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Setting path to files in test plan or include files

    Hello,

    To date, all files are being specified with the full directory path. This is true for test plans where I have been using script statement as
    script: c:\smoketest\scripts\myscript.t
    and in scripts where I have use statements as
    use "c:\smoketest\library\userfunction.t

    What I have been attempting to do is define a path variable in the test plan and test frame file, so that in the script or use statement I can just add the file name at end of the path name. But so far I have not been able to do this successfully.

    In the test plan I have tried
    $Dir = c:\smoketest\scripts\
    script: $Dir+filename

    In the test frame I set
    sFuncDir = "c:\smoketest\library\"
    and then in test script
    use sFuncDir+sFilename

    If anyone out there has successfully achieved the result I am looking for, I would greatly appreciate hearing about it.

    Thanks,
    Derek Higuchi

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    MA
    Posts
    129
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting path to files in test plan or include files

    What I do is use "dot relative" paths, the same way most web site operators do their sites. Makes it not necessary to know the full path to the automation directory.

    Given:
    c:\smoketest\include\include.inc
    c:\smoketest\test.t
    c:\commondir\commondir.inc

    In test.t, you want to include "include.inc"

    you'd put:
    use ".\include\include.inc"

    If you wanted "commondir.inc" you'd put
    use "..\commondir\commondir.inc"

    See what I mean?
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  3. #3
    Senior Member
    Join Date
    Mar 2000
    Location
    Dublin, Ireland
    Posts
    152
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting path to files in test plan or include files

    Hi,

    Adding to what Styler has written, why not use that approach in conjunction with an options set? The file path should then only need to be specified once in the Runtime Options.

    John.
    John O'Neill.
    Quality Automation Ltd.
    www.quality-automation.com

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Burlingame CA 94010
    Posts
    502
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Setting path to files in test plan or include files

    Right on target, styler !!!!!

    ------------------
    John W Green
    jwgreen@automationexpertise.com
    http://www.automationexpertise.com

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin 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 07:39 AM.

Copyright BetaSoft Inc.