Results Folder variable?

Is there a variable scripts can use to programmatically determine where the results folder is located?

Comments

  • You can use a combination of the "folder" function and "my folder" property to obtain the folder path of the top level "Results" folder for a given script.
    put my folder   -- displays folder of current script
    
    put folder(my folder)  -- displays suite directory path
    
    put folder(my folder) & "Results" into results_dir  -- will put top level results path into variable called results_dir
    

    You may also want to refer to the "ScriptResults" function in the Eggplant Reference manual.
  • JonathanOSXJonathanOSX ForumAdmin admin
    There is a function, scriptResults(), that gives you all of the results for the currently running script in a list. The current run is the last item. The results contain a variety of useful properties, but you will want the logFile property.
    put the logfile of the last item of scriptResults()
    

    You can access this value to look at it but you can't change the result location during a script run. If you would like to change where scripts are recorded for a suite you can set that in the Settings tab (on Eggplant 4.0+).
Sign In or Register to comment.