SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Junior Member
    Join Date
    Mar 2002
    Location
    Lebanon, NH
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Runtime Options and Use Files

    I'm using ST 5.5 SP3, installed on C:\Program Files\Segue\SilkTest
    I have a file (D:\Develop\Branch4\AutomatedTests\Loggin\LogResul ts.inc) that I want to include in the Options/Runtime -- Use Files field.
    The problem is I don't want the whole path to file 'LogResults.inc'. The reason for this is the branch changes depending on the version we're working on (e.g. 'D:\Develop\main', or 'D:\Develop\Branch4').
    So, I would like the Use Files field too look something like this: "extend\explorer.inc, Registry.inc, Logging\LogResults.inc"
    The problem is SilkTest looks in its working directory (C:\Program Files\Segue\SilkTest), then throws an error saying the file can't be found.
    Does anyone know how to get SilkTest to look in multiple specific directories for files listed in Options/Runtime -- "Use File:"?

    Thanks
    Joel

    ------------------

  2. #2
    Senior Member
    Join Date
    Oct 2001
    Location
    NC, United States
    Posts
    148
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Runtime Options and Use Files

    you could try with different option sets

    ------------------
    -gram
    -gram

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Runtime Options and Use Files

    Caveat -- I haven't got access to Silk at the moment so am doing this from memory ...

    Right next to "Use Files" in the Runtime options is "Use Path" (or is it "Search Path"?).

    You can put one or more paths separated by commmas into that field -- and Silk will traverse those paths looking for the files you specify in the "Use Files" field.


    ------------------

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    117
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Runtime Options and Use Files

    ... and now that I've re-read your question again I can see that my solution only helps a little. You still have to put the "BranchN" into the Use Path field.

    You could try (I haven't, so can't say how it will work) using a variable that you define outside of Silk in the Use Path (or Use Files) field -- e.g. D:/Dev/%CURR_BRANCH%/Loggin -- that way your options file could be "generic" but would require you to set environment variables appropriately before invoking Silk.


    ------------------

  5. #5
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Runtime Options and Use Files

    With a bit of careful structuring of the path to that file you could make it relative using:

    .\LogResults.inc // look 'here'

    OR

    ..\LogResults.inc // look in parent folder

    John


    ------------------

  6. #6
    Junior Member
    Join Date
    Mar 2002
    Location
    Lebanon, NH
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Runtime Options and Use Files

    Thanks to all for your responses!
    Gram,
    I am using different option sets, but the issue with this solution is that the option set must be different for each Branch of my product that I'm working on. Currently, when SilkTest is launched by our automated build/test process I use the command line switch '-opt [optionSet]'. This is easy to do, and works great. But, if there's a failure, and I need to open Silk and look stuff over, maybe restart a test, then I must manually select the option set I need. What I may end up doing is creating several SilkTest shortcuts that launch ST with a given option set, depending on the branch I need to work on.

    Brent,
    I've tried using an environment variable, but Silk doesn't recognize it. This would be the ideal solution and I would love to find a way to do it!!

    John,
    I know what you're talking about, but I'm not following how I would structure the path to solve the problem without major restructuring. Our entire build process rotates around the directory structure '[drive]:\Develop\[branch]\[project]'
    One possibility is to simply put these files in the 'C:\Program Files\Segue\SilkTest' directory. The problem is that I must manually copy files to that directory for each machine running the Silk host, each time any of the necessary files change.

    ------------------

  7. #7
    Senior Member
    Join Date
    Oct 2001
    Location
    NC, United States
    Posts
    148
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Runtime Options and Use Files

    Another: if you are working/running cases through a plan file you could specify optionset:filename.opt for a plan file and it would apply for testcases related to it.

    And you should be able to refer LogResults specified in Use File if the logresults file specified is in a directory included in Use Path(usually does!!...not sure). To use env_values play around with - in Use File: {HOST_GetEnv("ABC..")}Logging\LogResults.inc and at start of test SYS_SetEnv("ABC...", sValue)
    ------------------
    -gram

    [This message has been edited by gram (edited 11-12-2002).]

    [This message has been edited by gram (edited 11-12-2002).]
    -gram

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

    Re: Runtime Options and Use Files

    As John was saying above, in the projects I manage we use option sets that have a blank Use Path, and only the Segue files (extend\explorer.inc,extend\javaex.inc) in the Use Files.

    The .T, .INC, and .PLN files use dot relative paths to find the files they need. We use subdirectories and require that when getting scripts from source control that the directory structure must be preserved.

    This way we're not hard coding fully qualified paths and running into the kind of challenges you describe.

    We also use .PLN files that load the option set explicitly so it is easy to set up scripts on new installed PC's. Calling .PLN files from command line works great as well, we do that for the daily smoketest runs using scheduled tasks.

    Here's an example of a header from one of the include files in the project:
    .\ is the current directory
    ..\ is the parent directory


    ------------------
    Steven Tyler
    SQA Automation Team Manager
    Workforce Central Group
    Kronos Incorporated
    E-Mail: styler@kronos.com
    www.kronos.com
    Improving the Performance of People and Business™
    Steven Tyler
    Manager - Performance Engineering

    Kronos Incorporated
    tel: +1 978 947 4219

  9. #9
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Runtime Options and Use Files

    '[drive]:\Develop\[branch]\[project]"

    1. OK, then how about copying this file to the Develop folder and using "..\..\logresults.inc" ? This effectively ignores the names of any two previous parent folders.

    2. Realise too that if you're running from a .pln that you can copy that inc file anywhere you want in a setup($Branch, $Project) testcase that is listed to run just prior to the the test .t file. The file will be included when that .t is run.
    In effect, you can use Silk to rewrite itself.

    3. Also, if there's nothing unique about the contents of this logresults.inc file, you could consider including it in a "use" line in every .t file that will need it.

    John



    ------------------

 

 

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.