SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic paths for scripts in .pln files?

    My .pln file has test cases defined kind of like this:

    [-] 28. Verify Initial display some window
    [ ] script: TestCases.t
    [ ] testcase: WindowMain
    [ ] testdata: "28", $DB_Machine, $DB_Instance


    The problem is, sometimes I want to use the TestCases.t file that is in a different directory as my .pln file. SilkTest doesn't seem to like this unless you specify the FULL path to the file. And I don't want to keep changing paths on 100's of test cases all the time.

    Is there any way to specify the path to the .t file in a variable? I tried it and it didn't seem to work.

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Location
    Waltham, MA
    Posts
    107
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic paths for scripts in .pln files?

    You could use $ method in your testplan, such as .....

    $ScriptPath = C:\Path\script.t

    testing
    script: $ScriptPath
    testcase: YourTest
    testdata: "YourData"

    Then, you would only have to change the $ScriptPath at the top of your plan once, and all the scripts you set to use $ScriptPath would use that same script.

  3. #3
    Advanced Member
    Join Date
    Oct 1999
    Location
    Chicago, IL
    Posts
    652
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic paths for scripts in .pln files?

    Ahhh, that was it. Thanks. I tried that before but I used the syntax (with quotes):

    $ScriptPath = "C:\Path\script.t"

    If I instead, take the quotes off and specify the script like this, it works:

    $ScriptPath = C:\Path

    Test
    script: $ScriptPath\Script.t


    Thanks again!

  4. #4
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Dynamic paths for scripts in .pln files?

    Relative paths work fine too. I use stuff like the following quite often.
    script: ..\testcase.t
    script: ..\otherfolder\testcase.t

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

    Re: Dynamic paths for scripts in .pln files?

    Hi,

    I agree with Polly. For this exact reason, I always create plans and scripts in sibling directories. This allows you to refer to a script from a plan using

    \silk
    \silk\scripts - .t files
    \silk\plans - .pln files
    \silk\include - .inc files
    \silk\data - test data
    \silk\results - .res files (Optional)
    \silk\objects - .ino, .to files (Optional)

    script: ..\scripts\myscript.t

    Moving this to a completely different location won't cause any problems using this method.

    Hope this helps



    ------------------
    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 05:32 PM.

Copyright BetaSoft Inc.