One of the most extensible features of the TestTrack triggers functionality is the ability to execute scripts when a trigger activates. From within the executing script, you can pull pretty much any piece of information from the object that triggered the script, via environment variables.
Problem is, your defect object isn’t the same as my defect object or another user’s defect object. This makes it impossible for Seapine to provide a standard answer when you’re wondering how to get the value of a custom field, specific event or some other field in the object.
Some of the standard fields are covered in the next sections, or you can create a trigger in TestTrack to provide you with that information for your installation.
TestTrack Defect Fields
| TestTrack Defect Environment Variables | |
| Variable | Definition |
| DNUM | Defect number |
| SUMM | Defect summary |
| DFSA | Defect status attribute (Open/Closed) |
| STAT | Defect status |
| DISP | Defect disposition field |
| PROD | Defect product field |
| TYPE | Defect type field |
| PRIO | Defect priority field |
| SEVR | Defect severity field |
| NUMR | Defect reported by count |
| FNDBx | Defect reported by (where x is the reported by record) |
| FNDDx | Defect date reported (where x is the reported by record) |
| DESCx | Defect description (where x is the reported by record) |
| STEPx | Defect steps to reproduce (where x is the reported by record) |
| FNDBx_ATT_CNT | Defect reported by attachment count (where x is the reported by record) |
| FNDBx_ATTy | Defect reported by attachment s(where x is the reported by record, y is the attachement number) |
| CREB | Defect created by |
| CREB | Defect created by |
| CRED | Defect date created |
| MODB | Defect last modified by |
| MODD | Defect last modified date |
| ENTB | Defect entered by |
| ENTD | Defect date entered |
| FNDB | Defect found by (see also FNDBx) |
| FNDD | Defect date found (see also FNDDx) |
| EVT_CNT | Defect event history count |
| EVTx_NAME | Defect historical event name, where x equals the ordering of the events (asc) |
| EVTx_Z_??? | Defect historical event field, where x equals the ordering of the events |
| SCC_CNT | Defect source code attachment count |
| HEML | Defect has emails attached? (Yes/No) |
| PROJNAME | TestTrack project name |
| TTSTUDIOURL | Test Track Studio URL for defect |
TestTrack Test Case Fields
| TestTrack Test Case Environment Variables | |
| Variable | Definition |
| TCNUM | Test case # |
| TCSUM | Test case summary |
| TCSTA | Test case status attribute (Open/Closed) |
| TCSTS | Test case status |
| TCTYP | Test Item Type |
| TCAUT | Automated Test? (Yes/No) |
| TCSTP | Test case Steps tab |
| TCCBY | Test case created by |
| TCDTC | Test case date created |
| TCLST | Test case last modified by |
| TCDTM | Test case last date modified |
| TCTTR | Total test runs generated from test case |
| TCPTR | Total test runs passed from those generated by test case |
| TCFTR | Total test runs failed from those generated by test case |
| TCOTR | Total test runs open from those generated by test case |
| TCCTR | Total test runs closed from those generated by test case |
| EVT_CNT | Test case event history count |
| EVTx_NAME | Test case historical event name, where x equals the ordering of the events (asc) |
| EVTx_Z_??? | Test case historical event field, where x equals the ordering of the events |
| TCSCR | Test case has scripts attached? (Yes/No) |
| TCFIL | Test case has files attached? (Yes/No) |
| ATT_CNT | Test case file attachment count |
| TCSCC | Test case has source code attached? (Yes/No) |
| SCC_CNT | Test case source code attachment count |
| HEML | Test case has emails attached? (Yes/No) |
| PROJNAME | TestTrack project name |
| TTSTUDIOURL | Test Track Studio URL for test case |
TestTrack Test Run Fields
| TestTrack Test Run Environment Variables | |
| Variable | Definition |
| TRNUM | Test run # |
| TRTCN | Test case #, that generated the test run |
| TRSUM | Test run summary |
| TRSTA | Test run status attribute (Open/Closed) |
| TRSTS | Test run status |
| TRTYP | Test Item Type |
| TRSET | Test Run Set |
| TRAUT | Automated Test? (Yes/No) |
| TRSTP | Test run Steps tab |
| TRCOV | Test run test variant selection |
| TREST | Test run estimated time |
| Z_??? | Test run custom field (???? = fieldcode) |
| TRCBY | Test run created by |
| TRDTC | Test run date created |
| TRLST | Test run last modified by |
| TRDTM | Test run last date modified |
| EVT_CNT | Test run event history count |
| EVTx_NAME | Test run historical event name, where x equals the ordering of the events (asc) |
| EVTx_Z_??? | Test run historical event field, where x equals the ordering of the events |
| TRSCR | Test run has scripts attached? (Yes/No) |
| TRFIL | Test run has files attached? (Yes/No) |
| ATT_CNT | Test run file attachment count |
| TRSCC | Test run has source code attached? (Yes/No) |
| SCC_CNT | Test run source code attachment count |
| TRRES | Test run has run results? (Yes/No) |
| HEML | Test run has emails attached? (Yes/No) |
| PROJNAME | TestTrack project name |
| TTSTUDIOURL | Test Track Studio URL for test run |
Download
Download the Trigger Script for Windows zip file.
Using the Script
- After you download the zip file, extract the batch.
- Create the trigger you want to use with TestTrack. Instead of pointing it to your actual script, point it to the batch file you downloaded.
- Now do whatever it is that activates the trigger in TestTrack. That could be editing a defect, creating a defect, or moving a defect into a specific state.
- Finally, assuming all went well with the trigger activation you should have a file named C:\saveenv.txt. This file contains output of all of the environment variables accessible during the triggered script execution.
- Save the C:\saveenv.txt file.
- You can then review it when you’re not sure how to access a certain piece of data.
- You can also inactivate the trigger, leaving it available in case you add or change fields and need to generate a new list of environment variables.
Note: Seapine does not provide support for sample triggers.
Share on Technorati . del.icio.us . Digg . Reddit . Slashdot . Facebook . StumbleUponRelated posts:










June 14, 2010
[...] a flag telling the application to create a job from the defect. Defect information is pulled from environment variables passed to the application at [...]