| || |
Configuring directory paths
User Misha (firstname.lastname@example.org) posted:
This depends on how much they will be used.
If you don't think the user will change these values often, they are better
off defined in a startup file instead of at the start of each test case.
To read ini files, use GetPrivateProfileString() from win32api.
If you have only a few settings, you could store them in wrun.ini with
Predefined structures are great, careful the paths don't get too long. Will
you provide a nice way of changing it as well? What is the most likely way
the user will want to change it?
Perhaps a nice solution is a user-defined function to change the values,
then you can try out whatever methods you like transparent to the user :-)
----- Original Message -----
From: leenapreji <email@example.com>
Sent: 10 September 2002 17:41
Subject: [winrunner] Configuring directory paths
The following paths are required for a set of winrunner test modules
to be executed.
These are defined as static constants at the beginning of each
winrunner automated testcase.
I have 2 design options if the user wants to update these paths.
1. Have a configuration file ( sort of ini file ) and make the
testcase read the corresponding path from the ini file.
The user has to update the path in the ini file corresponding to the
directory where he has stored all these files.
Is there an Windows API which I can use in winrunner to read and
update a ini file ??
2. Have a predefined directory structure in the Visual Source Safe
and assume that the user would download the whole directory from VSS
to the machine he wants to run the testcases on.
example :- The main directory in VSS is "Winrunner Automation"
Patch and DLLs
are directories under Winrunner Automation.
And use the relative path GUI_MAP_FILE_PATH = "..\\..\\GUI
Which one of these options would be a better design and why ? Could
anybody help me?
Re: Configuring directory paths
User (firstname.lastname@example.org) posted:
Neither. The following is probably your best option if these paths change
Set up a WinRunner startup script which contains the variables
GUI_MAP_FILE_PATH etc. and sets them up from an Excel datasheet. This
startup script can be configured, within WinTunner, to run when WR starts so
that your path name varaibles are loaded with WR. Once this has been done
you can just use the path names, ie. there is no need to define them in
This is the method I have benn using sucessfully for quite a while. If you
want further details you may conatct me.