Enabling and configuring source control operations for ApTest Manager

The source control operations are defined in the file config.pl, in the root directory of your ApTest Manager installation.

Note: if the sourceControl flag in config.pl is set to 1, if any of the source control operations described below are not defined, users will be prohibited from performing operations that would require that functionality. Source control commands are executed only if the sourceControl flag is enabled.

Note: these commands are executed in the context of your web server application, so be certain that the user your web server is running as is able to perform source control operations. Also, ensure that the source control application(s) are in the path of the web server, or use absolute paths in the commands below.

1 Macros

In each of the source control configuration options, the following macros can be used:

2 Source control commands

Note: there is no source control command for removing a repository. If you delete a test suite in ApTest Manager, it will be removed from the collection of test suites that ApTest Manager presents to users. However, it will not be removed from the source control system's repository. This is a safety feature to prevent the loss of historical data. If you really want to remove a test suite from the source control repository as well, you must do it outside of ApTest Manager.

2.1 addDir

The command to add a directory to the repository. For example:

$addDir = "cvs add %DIR; cvs commit -m 'commit from ApTest Manager user %USER' %DIR";

2.2 addDirR

The command to add a directory and its contents to the repository. If this is defined, then only one source control operation per folder add will be performed. Without it, ApTest Manager uses addFile and addDir to emulate this behavior.

2.3 addFile

The command to execute to add a file to the repository. Used when creating new test cases. For example:

$addFile = "cvs add %FILE; $checkin";

2.4 checkin

The command to execute to check a file into the source tree. In this command, the string %FILE represents the file to check in. For example:

$checkin = "cvs commit -m 'commit from ApTest Manager user %USER' -f %FILE";

2.5 edit

The command to execute to check a file out of the source tree for editing. For example:

$edit = "cvs edit %FILE";

In this command, the string %FILE represents the file to check out. If your source code control system does not require "checkout" operations, you can leave this as "".

2.6 newRepository

The command to execute to create a new instance in the repository. This is used when creating a new test suite. For example:

$newRepository = "cd %SUITEDIR; \
cvs import -m 'initial version' %SUITE.ts aptest r1; \
cd ..; rm -rf %SUITE.ts; cvs checkout %SUITE.ts";

2.7 removeFile

The command to remove a file from the repository. For example:

$removeFile = "cvs remove -f %FILE, $checkin";

2.8 removeDir

The command to remove a directory from the repository. This command is not expected to remove the files inside the folder - the removeFile operation will be used to do that.

Note: CVS does not support removing directories.

2.9 removeDirR

The command to recursively remove a directory and the files and directories within that directory. If this is defined, then only one source control operation per folder remove will be performed. Without it, ApTest Manager uses removeFile and removeDir to emulate this behavior.

2.10 renameFile

The command to execute to rename a file in the repository. For example:

$renameFile = "cp %OLDFILE %FILE; \
cvs remove -f %OLDFILE; \
cvs commit -m "ApTest Manager removing file by %USER" %OLDFILE; \
cvs add %FILE; \
cvs commit -m 'commit from ApTest Manager by %USER' -f %FILE";

2.11 renameDir

The command to execute to rename a directory in the repository.

Note: CVS does not support renaming folders or files. renameFile can be emulated, but renameFolder is much harder to emulate.

2.12 update

The command to execute to ensure that files are synchronized with the repository. This command is only used by a test suite manager within the test suite management menu when source control is enabled.

$update = "cvs update -d";

Copyright © 2000-2006 Applied Testing and Technology, Inc. All rights reserved.