October 18, 2007
Migrating Perforce Jobs
Works with TestTrack 7.6 and later
Works with P4COM API released on 9/07This article includes information for migrating Perforce Jobs into TestTrack Pro. This application should not alter your Perforce server, but run it at your own risk. Be sure to back up!You'll need:
- Working Perforce client/server installation.
- A comma-separated value file that contains your Perforce Jobs, ready for import into TestTrack Pro.
DownloadThe download contains the source files and binaries for the application. Download the P4JobExport zip file.
- P4JobExport.exe - Executable built with C# .Net and Visual Studio 2005. The application exports Perforce Jobs to a comma-separated value file, ready for import into TestTrack Pro.
- Source Code - Visual Studio 2005 solution and all required source code to build the executable. You only need this if you want to make changes to the application or it doesn't work as-is in your environment.
Application OverviewThe application and accompanying library should run without any additional configuration. The application connects to your Perforce server using your cached credentials from the system. If this doesn't work in your environment, you can update the source to specify connection data manually. The application accepts one parameter, which is an optional file path/name for the CSV output file. If this is not given, the CSV will be output to the execution directory. The application also writes a log file to the execution directory. The application does not return success or failure, so you should check the log file thoroughly to ensure everything worked as expected. The application uses the P4COM interface to interact with the Perforce server. The dll is included in the source, and is required to build the application (be sure to register it).
- Connect to Perforce server.
- Fetch users via the users command, and retain <username/full name> pairs.
- Fetch jobs via the jobs -l command.
- Parse jobs, building one csv line per job.
- Maintain list of distinct Job field names.
- Replace every username with matching full name.
- Write CSV line for distinct Job field names.
- Write CSV line for every Job.