TestTrack supports integration with Perforce SCM. See TestTrack Third-Party Integrations for supported platforms and versions.
This article includes information about the integration requirements, configuring the integration in TestTrack, performing Perforce actions, and troubleshooting.
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 the TestTrack Client, 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:Usersusernamep4server_1666my_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. See the TestTrack help for information.
- 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 folders 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 in TestTrack
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 latest version of the selected file on the Perforce server.
- History—Displays the entire history of the selected file from the Perforce server.
Perforce integration stops working
Use the following p4 commands to ensure Perforce is working correctly. If the commands fail, refer to the Perforce documentation 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 correctly, 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 correctly, fixed revision numbers and timestamps are not updated when changes are submitted from TestTrack.
The 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.
The TestTrack Attach Files dialog box is empty
Use the following p4 commands to update the source file list. If the commands fail, refer to the Perforce documentation for information.
- Enter p4 dirs from a command prompt to update the folder structure from the Perforce server.
- Enter p4 file from a command prompt to update the list of files for a specific Perforce folder.
A Request too large error occurs
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.