SPONSORS:






User Tag List

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Mel
    Mel is offline
    Junior Member
    Join Date
    Mar 2001
    Location
    San Jose, CA, USA
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Get Location of RESULTS File

    Is there a (relatively) easy way for a test-script to identify the directory of the RESULTS file? There apparently is no equivalent to "GetStartDir" or "GetProgramDir".

    I had considered reading the "ResultsPath" value contained within the "PARTNER.INI" file, but that seems to get complicated if the user installs an "options" file (so I would then need to identify and read a separate file, right?)

    Any better ideas ?


  2. #2
    Junior Member
    Join Date
    Aug 1999
    Location
    mt view, Ca
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get Location of RESULTS File

    Mel,
    The default setting is to name the results file the same as the SCRIPT, not testcase, with extension of .res. It is stored in the same directory as the script file. You can change this by selecting options/runtime. There is a Results area where you can specify a directory and/or filename.
    Len
    Len Jagelski
    Automation Engineer
    Lotus, cc:Mail

  3. #3
    Junior Member
    Join Date
    Aug 1999
    Location
    Boston, MA
    Posts
    16
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get Location of RESULTS File

    Unless you've changed the path of the results dir in the Options|Runtime screen, your results file should be in the same dir as the script. Which you can access via GetProgramDir()
    John McGrail

  4. #4
    Mel
    Mel is offline
    Junior Member
    Join Date
    Mar 2001
    Location
    San Jose, CA, USA
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get Location of RESULTS File

    Let me try to clarify my problem. The test-scripts which I create can be run on several different desktop PCs --- by several different people. They all have their own personal preferences and customizations for such things as the subdirectory location of the RESULTS file.

    Each of these test-scripts will attempt to copy the "n-1" version of the "<script-name>.RES" file to an archive location when it first starts up. This works fine when the RES-file is in a known (standard) subdirectory. I would like to expand this so that the test-script dynamically identifies the LOCATION (the subdirectory) of the "<script-name>.RES" file. Then I could get these scripts working for EVERYBODY here --- even for those folks who desire to use oddball subdirectory names.

    If the 4TEST code is too difficult to do, I suppose that I could mandate that everyone chose the same (standard) subdirectory name.

    Any thoughts? Remember, I only need to identify the LOCATION of the RESULTS file... and this can vary from system to system.


  5. #5
    Junior Member
    Join Date
    Aug 1999
    Location
    mt view, Ca
    Posts
    8
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get Location of RESULTS File

    Mel,
    There is another class of function besides Get/Set - Sys functions, and there is a Sys_GetDir() that returns the current working dir. I have found it to be somewhat inconsistent though and have taken to defining in the frame file a "HomeDir". This allows me to be dynamic on referencing files in different directories. I read your initial aversion to defining/reading an external file, but we make good use of that to increment build numbers without having to modify the scripts themselves. Just read in the build num and the results directory, then you can use Sys_SetDir() for your target and check for the .res with SYS_FileExists(). Good Luck, -Len
    Len Jagelski
    Automation Engineer
    Lotus, cc:Mail

  6. #6
    Senior Member
    Join Date
    Jul 2002
    Location
    Paris (France)
    Posts
    182
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get Location of RESULTS File

    Ok, so the problem is that each user may be putting SilkTest in a diffrent folder, they may or maynot be using a custom option file, and in the option file they are using, they may or may not have a place set for the result file. So, you just need to collect all this information, right?

    1. Get location of SilkTest.
    Read Registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\Segue Software Inc\SilkTest\5.0\DIRECTORY

    2. What option file?
    Read Partner.ini located in base of SilkTest folder (see #1). This is a standard INI file. Read [State]OptionsSet.

    3. Find where the Results are saved:
    The OptionSet is really just another INI file, just named diffrent. Mine is basic.opt. Read the value of [Runtime]ResultsPath.

    Now you have the place where the option files are saved.

    For functions to read the registry and INI files with easy, I posted about a month ago functions for making LOG files. Included in that is a UTITILIES.INC file. This file has handy functions for reading the Registry and INI file (as well as writing to them if needed).

    Put all this in a funtion, and you have a simple way of finding where the result files are.



    ------------------
    David Genrich
    Icarian
    333 Moffett Park Drive
    Sunnyvale, CA 94089
    davidg@icarian.com



  7. #7
    Mel
    Mel is offline
    Junior Member
    Join Date
    Mar 2001
    Location
    San Jose, CA, USA
    Posts
    28
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get Location of RESULTS File

    David,

    Yes, you summarized my problem very well, and your proposed solution makes sense. This method is similar to my own initial approach --- and is also the method I was attempting to avoid. (oh well)

    As time permits, I will develop the code for this. Meanwhile, I'll also try to convince the test-script users about the virtues of standardization --- which might alleviate the need this code.

    Its a shame that Segue doesn't have something like "GetResultsDir()".

    Thanks for the ideas.


  8. #8
    Junior Member
    Join Date
    Dec 1999
    Location
    Allendale, NJ, US
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get Location of RESULTS File

    Suggestion:

    Go to Dave Reed's QA Partner site. http://www.aimnet.com/~dcreed/qap/main.html

    He's got some interesting functions written in silktest, including finding files.

    Good luck, Bill



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

  9. #9
    Junior Member
    Join Date
    Dec 1999
    Location
    Boston, Ma, USA
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get Location of RESULTS File

    Hmm Well i may be off course here, but couldn't you do an ResExportOnClose(Path) And always know where to find it.?

  10. #10
    AJ
    AJ is offline
    Moderator AJ's Avatar
    Join Date
    Jun 1999
    Location
    San Jose, CA
    Posts
    1,691
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Get Location of RESULTS File

    Mel, you may want to register...

    It would have been easier if you either uploaded that file, or use the
    [ code] and [/ code] tags (without the spaces)

    I'll modify your post to reflect that.

    ------------------
    AJ Alhait
    BetaSoft Inc.
    AJ Alhait
    BetaSoft Inc.

 

 
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
  •  

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 11:10 PM.

Copyright BetaSoft Inc.