Note: The following information only applies to TestTrack 2016.1 and earlier. If you use Helix ALM, see Helix Versioning Engine Integration.
TestTrack supports integration with Perforce Helix.
This article includes information about the integration requirements, configuring the integration, performing Perforce actions, and troubleshooting.
- Make sure you are using a supported Perforce Helix version.
- The Perforce client must be installed and able to connect to the Perforce server. TestTrack uses the same server connection information as the Perforce client.
- If you use 32-bit Perforce, the 32-bit TestTrack Client must be installed. If you use 64-bit Perforce, the 64-bit TestTrack Client must be installed. See the TestTrack installation help for information.
Configuring the integration
- In TestTrack, choose Tools > Source Control Integration. The Source Control Integration dialog box opens with the Provider category selected.
- Select Perforce SCM and click Make Current.
- Select the Connection category.
- Enter the Perforce server and port number in the Server:Port field. For example, Server1:1666.
- Enter the Perforce workspace name without the path in the Workspace field. For example, if the workspace is located in C:\Users\username\p4server_1666\my_workspace, enter my_workspace.
- Enter the Perforce Username and Password and click Validate Connection. TestTrack verifies the Perforce connection.
- Select the Project Options category.
- Enter any Default check in comments. You can use field codes to automatically add issue-related information to check in comments.
- Select a Perforce File Attachments option.
- Select Retrieve all files at once to retrieve all files from the Perforce server at the same time. Use this option only if you are connecting to a small-to-medium Perforce server.
- Select Retrieve files by directory to retrieve file listings for Perforce depots as you select them. Use this option to improve performance if you are connecting to a large Perforce server.
- Select the Project Paths category.
- Expand the Branch tree, select a depot, and click Add. Users can access all files in the Perforce database if you select the root depot. Select specific depots to limit files users can access.
- Select the Workflow Events category.
- Select Allow entering issue workflow event when checking in files to allow users to add the selected TestTrack workflow event when checking in files.
- Select the Event to use.
- Click OK to save the configuration.
Performing Perforce actions
You can access the following Perforce actions on the Source Files tab when editing TestTrack items:
- Attach File—Attaches source control files to TestTrack items.
- Detach—Removes attached source control files from items.
- Sync—Retrieves a read-only copy of the latest file version from Perforce to the workspace. Checked out or locked files are not retrieved.
- Submit—Submits changes to Perforce. You can only submit files from the default Perforce changelist. If you are submitting files attached to an issue, click Submit & Fix to also move the issue to the Fixed state after changes are submitted. The file version number in the Fixed Revision column is updated after changes are submitted.
- Open for Edit—Retrieves a writable copy of the file to the workspace for editing. You must open the file in the editor from the workspace to make any changes.
- Revert—Cancels the open for edit action.
- View Local Copy—Displays the content of the local file in the working directory.
- History—Displays the entire history of the selected file from the Perforce server.
Integration stops working
Use the following p4 commands to ensure Perforce is working. If the commands fail, see the Perforce help for information.
- Enter p4 info from a command prompt to verify your Perforce username, client name, and client root path are current. If this command does not run, you cannot use Perforce commands in TestTrack.
- Enter p4 fstat from a command prompt to verify specific file information, including the local path, current status, and latest revision. For example, you can enter p4 fstat //depot/mydocs/design.doc to see if Perforce can retrieve the design.doc information. If this command does not work, fixed revision numbers and timestamps are not updated when changes are submitted from TestTrack.
TestTrack Attach Files dialog box opens slowly or does not open
Change the Perforce File Attach Option to retrieve files by directory to improve performance.
- In TestTrack, choose Tools > Source Control Integration.
- Select the Project Options category.
- Select the Retrieve files by directory.
- Click OK to save the changes.
TestTrack Attach Files dialog box is empty
Use the following p4 commands to update the source file list. If the commands fail, see the Perforce help for information.
- Enter p4 dirs <depot_directory> from a command prompt to update the subdirectory structure for the specified Perforce depot.
- Enter p4 files <depot_directory> from a command prompt to update the list of files for the specified Perforce depot.
Request too large error is returned
A Perforce command is returning the maximum number of allowed results. The maximum results limit is enforced when the Retrieve all files at once file attach option is selected in the TestTrack source control integration project options. The maxResults and maxScanRows limits can be reconfigured using Perforce groups. Ask your Perforce administrator for information.