- Configuring the test mode
- Command line
- Directory of the files used for test
- Runtime directory
- Vista manifest
- Other user account
Running the test of a project: setting
The test of the entire project is used to simulate the start of the application by the executable. This allows you to run the test of the entire application, even if its development is not finished yet. As soon as a problem occurs in the execution of the project, the debugger can be started to identify and fix the problem.
Different parameters are used to:
- Run the test of a project by specifying a command line.
- Run the test of a project by specifying a specific runtime directory.
- Run the test of a project with a manifest (in Windows Vista only)
- Run the test of a project by using the rights granted to another user. This setting is used to check the operating mode of the application by simulating the UAC mechanism in Windows Vista.
: The test of a project can be run regardless of the current element in the editor.
Configuring the test mode
Command lineTo run the test of a project by using a command line, this command line must be specified via "Project .. Test mode .. Configure the test mode" ([Ctrl] +[Shift] + [F9]).To run the test of a project while using a command line, all you have to do is specify this command line:
- On the "项目" pane, in the "测试模式" group, expand "测试模式" and select "Configure the test mode" ([Ctrl] +[Shift] + [F9]).
- Enter the command line.
The different elements of the command line will be passed in parameter to the current program.
Reminder: these parameters can be retrieved by programming via 命令行.
Directory of the files used for test
To configure the data files used when running the test of the application in the editor:
Note: User Groupware
- Display the description of the project ("Project .. Project description").Display the description of the project: on the "项目" pane, in the "项目" group, click "描述".
- In the "Files" tab, select the location of test files:
- Directory of the current configuration or current directory: The data files used will be found in the sub-directory corresponding to the configuration of the project (sub-directory of the EXE directory of the project).
- Specific directory: The data files will be found in the specified directory.
- Directory of the application data (recommended when using the application in Windows XP, Windows Vista and later). This directory is different if the data is common to all the application users or if the data is specific to each user.
If your application is using the user groupware, you must configure the location of the data files found in the user groupware. To perform this setting:
- Display the description window of the User Groupware ("Workshop .. Configure the user groupware").Display the description window of the User Groupware: on the "项目" pane, in the "项目" group, click "用户群组".
- Display the "Files" tab.
See Data files of user groupware for more details.
WinDev allows you to run the test of the project in a directory other than the "EXE" directory of the project. Therefore, the test is run in conditions close to the ones found on the end-user computers.
To modify the runtime directory of the application:
- Select "Project .. Test mode .. Configure the test mode".On the "项目" pane, in the "测试模式" group, expand "测试模式" and select "Configure the test mode".
- In the window that is displayed, expand "Advanced modes (Windows Vista, UAC, ...)".
- In the "Runtime directory" tab, check "Start the test mode in the actual runtime directory: ".
- Select the requested runtime directory.
- The data files that will be taken into account are the data files found in the directories specified:
- in the project description.
- in the description of the user groupware if the user groupware is used by the application.
- Click the "Copy the files" button. For each data file, you can choose the directory into which this file must be copied:
- a directory proposed by default:
- <RuntimeDir>: Standard runtime directory of the application. This directory is identical to the one chosen in the "Runtime directory" tab.
- <DirDataUser>: Standard directory of the application data for a specific user. In Windows XP/Vista, this directory has the following format: "C:\Documents and Settings\<User>\Application Data\<Company Name>\<Application Name>".
- <DirCommonData>: Standard directory of the application data for all the users of the same computer. In Windows XP/Vista, this directory has the following format: "C:\Documents and Settings\ All Users\Application Data\<Company name>\<Application name>".
- <GlobalDirUser>: Standard directory of the data shared by several applications for a specific user. In Windows XP/Vista, this directory has the following format: "C:\Documents and Settings\<User>\Application Data".
- <GlobalDirCommon>: Standard directory of the data shared by several applications for all the users of the same computer. In Windows XP/Vista, this directory has the following format: "C:\Documents and Settings\All users\Application Data".
- in a directory selected via the picker ([...] option).
If Windows Vista is your operating system, WinDev gives you the ability to run the test of your application by using a manifest. This manifest can be included in the executable of your project when creating the executable.
Using a manifest allows you to specify the level of rights required to run the application.
The available manifests are as follows:
- No manifest
- No privileges
- Maximum user privileges
- Administrator privileges
See Choosing a manifest for Vista
for more details.
Other user account
WinDev enables you to run the test of the project in a directory by using a user account different from the current one. This enables you to run the test of the project by using rights other than the rights granted to the user currently connected.
Indeed, in most cases, you are the administrator of your computer when developing an application. In most cases, the users of your applications are standard users. This operating mode is even truer in Windows Vista.
WinDev enables you to run the test of your applications as a simple user: you can easily identify the problems of your applications caused by the rights and correct them if necessary.
Note: We advise you to combine this option with:
- the use of a runtime directory. For Windows Vista, the runtime directory and the data directory must correspond to the Vista standards.
- the use of a manifest (if your development computer runs on XP).
: The management of rights is taken into account for the disks that use a NTFS file system
. For the FAT32 file systems, the management of rights is not taken into account.
To run the tests by using another user account:
- Create (if necessary) one or more users on your computer. New users can be created from the control panel of Windows ("User accounts").
- In the "Other user account" tab, specify the characteristics of the user: Name, Password, Domain.
- The next test of the application will be run with this user.
Note: You cannot use an Administrator manifest with a local user who belongs to the administrator group.