|
To use certain features of eValid, such as Load Testing, files must be referenced from the script and successfully found within the computer's directory structure. The directory structure is used to accurately pinpoint files that are located on the computer.Files can be found by typing in the complete directory structure. For example, if one wanted to find an eValid script (named script.evs) in the default directory, the file's location would be:
C:\Program Files\Software Research\eValid\Program\Project\Group\script.evsYou can reference files from within eValid by typing the full directory, however this can create lengthy lines, not to mention increases the amount of time to write the script.
To ease the aforementioned directory 'woes', eValid has provided a Working Directory where you can save your scripts and not have to reference the full directory structure to use them.Click Settings > Record/Play Preferences to view the current settings for eValid's Working Directory. In the Project section on the top right of the Preferences window, there are four text boxes:
The Working Directory text box sets the current working directory.
- Working Directory
- Project Name
- Test Group
- Test Name
The Project Name and Test Group text boxes name folders under the working directory where the files will be stored in the directory order Project Name\Test Group.
Test Name is not used for file location. Rather, it is used as a reference to the contents of the script file; it can be used to help label and then identify scripts.
If you create a load test that does not utilize absolute paths, your script may not run if the eValid script file is not in the working directory. For example, your Working Directory, Project Name, and Test Group preference options set your working directory to C:\Program Files\My Scripts\My Project\My Group\, but your script file is located in C:\Program Files\Software Research\eValid\Program\Project\Group\. If you write your load test script line as:_eValid "script.evs" "" 5 "" "-pm 1.0"eValid will not be able to identify the location of the script. It believes the the script resides in C:\Program Files\My Scripts\My Project\My Group\script.evs when it is actually in C:\Program Files\Software Research\eValid\Program\Project\Group\script.evs.There are two ways to alleviate this problem.
- Change the working directory.
- Use absolute paths.
Changing the Working Directory:
To change the working directory, click Settings > Record/Play Preferences. Change the values under Working Directory, Project Name, and Test Group to reflect the directory where the script file is located.Using Absolute Paths:
You can also directly type the absolute path into the load test script. Using the example from above, the script would change to:_eValid "C:\Program Files\Software Research\eValid\Program\Project\Group\script.evs" "" 5 "" "-pm 1.0"
There are some advantages and disadvantages to using absolute paths and working directory paths. Consider the following:Absolute paths will work fine -- as long as you don't plan on moving your files to different locations. You would therefore have to change each line to reflect the new absolute path.
Working directory paths limit the location of all scripts to one directory. If you wish to use scripts from other directories, you would have to use the absolute path to reference them.
Working directory paths enable you to skip writing out a lengthy absolute path to a file, and makes the script easier to understand.
Absolute paths do not force you to reset the working directory in the Settings > Record/Play Preferences menu each time you change where you reference your scripts.
eValid uses a Working Directory to simplify calling other files within eValid scripts.