From Seapine Labs
Works with TestTrack 2008 and later
[edit] Overview
In this example, a TestTrack trigger in one project creates a defect in another project. This example is in the context of a client using TestTrack for both Help Desk and SDLC purposes. You can use it in other situations as needed.
You'll need:
- TestTrack 2008
- The TestTrack SDK installed on your TestTrack server.
- Access to the server computer that is hosting your TestTrack installation.
- The path to your TestTrack SDK installation. This example is set up to use Apache, so this path may need to be modified. If you're familiar with how web servers work and your IT environment, you can probably guess this. If not, ask your TestTrack administrator or IT staff for help.
You'll get:
- An automated trigger that creates a defect in one project from a defect in a different project, based on workflow state change.
[edit] Download
The sample has been packaged in two different forms, to make it as easy as possible for you to get started.
[edit] Windows
Download the WinCreateFR zip file.
The zip file includes a self-contained installer of everything discussed in this article:
- HelpDesk Project - TestTrack 2008 project, which serves as the source for defect creation. The trigger in this project creates a defect in the Development project.
- Development Project - TestTrack 2008 project, which serves as the destination for defect creation. The trigger in the HelpDesk project creates a defect in this project.
- CreateFR.exe - Executable built in C# .Net using Visual Studio 2005, which handles creation of the defect.
- CreateFR.py - Python script (v2.4), which handles creation of the new defect. If necessary, modify the path to the "ttsoapcgi.exe" to match the location in your Web server.
- CreateFR.bat - Batch file that acts an intermediary between the TestTrack trigger and the creation scripts. If necessary, modify the path to the "ttsoapcgi.exe" to match the location in your Web server.
- C# .Net Code - Source code for the CreateFR.exe executable.
[edit] Python
Download the PythonCreateFR zip file.
The zip file includes a self-contained installer of everything discussed in this article:
- HelpDesk Project - TestTrack 2008 project, which serves as the source for defect creation. The trigger in this project creates a defect in the Development project.
- Development Project - TestTrack 2008 project, which serves as the destination for defect creation. The trigger in the HelpDesk project creates a defect in this project.
- CreateFR.py - Python script (v2.4), which handles creation of the new defect. If necessary, modify the path to the "ttsoapcgi.exe" to match the location in your Web server.
- CreateFR.bat - Batch file that acts an intermediary between the TestTrack trigger and the creation scripts. If necessary, modify the path to the "ttsoapcgi.exe" to match the location in your Web server.
After you download the sample zip file, perform the following steps to set up the sample projects and try the trigger in TestTrack.
- Unzip the TTProjects\Help Desk.zip file into your TestTrack Server database directory. On a default Windows installation, you'd end up with this directory: C:\Program Files\Seapine\TestTrack\TTServDb\TTDbs\HelpDesk.
- Unzip the TTProjects\Development.zip file into your TestTrack Server database directory.
- Log into the TestTrack Admin Utility, click Projects then Add Existing to add the Help Desk and Development projects.
- Start TestTrack and login to the HelpDesk project as administrator with no password.
- Choose Tools > Administration > Automation Rules. Select the Trigger tab.
- At the bottom of the list, edit the Log Feature Request trigger, click the Actions tab then edit the Run executable entry.
- Edit the path to CreateFR.bat, as needed.
- You're all setup in TestTrack. Now you should edit the CreateFR.bat referenced in step 7 above to use the creation script you want. If you use CreateFR.exe, you can pass connection parameters directly from the batch. If you're using CreateFR.py, you'll need to manually update the connection parameters in the CreateFR.py script.
[edit] Try It
You're ready to try out the sample trigger.
- Log into the Help Desk project.
- Right-click defect #17 and select the Log FR event. This activates the trigger and creates a defect in the Development project.
- If there is an error, you will receive an error message in TestTrack and the defect will not move to the Closed (FR Logged) state.
- If everything goes successfully with the Log FR, you can then log into the Development project to see the newly created defect. Note the Ticket # field should contain 17, which is the defect that was modified in the Help Desk project.
Note: Seapine does not provide support for sample triggers.