October 27, 2008

Synchronizing TestTrack and SugarCRM

Helix ALM

Works with TestTrack 2008

Works with SugarCRM 5.1

Will not work with TestTrack 7.6 and earlier

This sample uses a TestTrack trigger to synchronize defect changes with cases in SugarCRM. You'll need:
  • A SugarCRM account.
  • Permissions within your TestTrack project to create executable triggers.
You'll get:
  • An automated TestTrack trigger that synchronizes defect changes with associated cases in SugarCRM.


The download contains the source files and binaries needed to synchronize data between TestTrack and Salesforce.com. Download the SyncTTPToSugar zip file.
  • SyncToCase.exe - Executable built with C# .Net and Visual Studio 2005. This script handles synchronizing defect changes with associated cases in SugarCRM.
  • SyncToCase.bat - Batch file that acts an intermediary between the TestTrack trigger and the SyncToCase.exe.
  • Source Code - Visual Studio 2005 solution and all required source code to build the SyncToCase.exe. You only need this if you want to make changes to the script. If you follow the steps in this article, the included .exe will work just fine.

Create TestTrack Trigger

You need to create a trigger in your TestTrack project to call the SyncToCase.bat you just downloaded.
  1. Login to your TestTrack project.
  2. Choose Tools > Administration > Automation Rules. Click the Triggers tab.
  3. Click Add to create a new trigger. Enter a trigger name, such as Sugar Sync.
  4. Click the Trigger When tab, select After Save then Defect is changed. This creates a trigger that executes after any defect changed is saved.
  5. Click the Actions tab, click Add and select Run executable from the list.
  6. Enter the path to the SyncToCase.bat you downloaded, being sure to wrap the path in quotes if it contains spaces.
You're all setup in TestTrack. Now you need to edit the SyncToCase.bat to call the SyncToCase.exe with the necessary parameters. When calling SyncToCase.exe, you need to pass your SugarCRM Soap URL username and password in plain text. For example, C:SyncToCase.exe http://myserver/suger/soap.php myusr mypwd

Try It

The only thing left to do is to mannually associate a defect in TestTrack with a case in SugarCRM. Lookup a case number in your SugarCRM account, and enter that into the Reference field of a defect in your TestTrack project. Save the defect, and that should activate the trigger we created. Refresh your SugarCRM view, and you should see a new entry in the History.

To make this even better, hook up another example I wrote that lets you create defects in TestTrack from SugarCRM. Using both examples, you can have a fully automated way for your Support team to escalate cases to Development and be kept up-to-date on Development's progress without ever leaving their SugarCRM account. Note: Seapine does not provide support for sample triggers.