Overture Search the Web.
Type it and go!
 
 
 
 

4Test Tips - Directory Functions

The 4Test language provides several functions that return directory names for use within your test scripts. Two things to be aware of:

Some of the values that come back from these functions have a subdirectory delimiter at the end and some do not. You should check before adding a file name to the end of the directory name.
Some of these functions may return either the long name or short name form of Windows directories. It appears to vary with whether SilkTest was started from the Start menu or through use of a file type association.

SYS_GetDir

Returns the current directory on the active target agent. It may also be directed to return the current directory on the host agent.

    sDir = SYS_GetDir()  // Target machine directory
    sDir = hHost -> SYS_GetDir() // Host machine directory

GetExecutableDir

Returns the host machine's directory where Segue's executable files reside. On Windows systems, this is where Segue keeps your partner.ini file that holds most of Segue's view of your test configuration. SilkTest provides the appropriate directory delimiter for your platform at the end of the returned string.

SYS_GetExecutableDir

Returns the target agent machine's directory where Segue's executable files reside.

GetProgramDir

Returns the host machine's directory of the current test script. This function allows you to find test data files that you chose to store with your test scripts. Now you can use your favorite version control software to track your data files for use with your data driven test cases. Store your data files with your test scripts to make them available during test execution in the directory returned by this function.

GetStartupDir

Returns the host machine's directory where Segue's startup include files reside. SilkTest provides the appropriate directory delimiter for your platform at the end of the returned string.

SYS_DirExists

Tests whether a specified directory exists.

SYS_GetDirContents

Returns FILEINFO information on all files and directories within the specified directory. Newer versions of 4Test include more information in the FILEINFO data type such as the last modification date time.

 

 

Send questions or comments about this web site to: webmaster@TestMap.com
Copyright © 1998,2001 Charles B. Hedstrom