Using Issue-Tracking Templates From Tests

Applies to TestComplete 15.70, last modified on December 17, 2024

Templates you create in the Template editor will appear in the Code Completion window as a method of the IssueTracking object; template fields are shown as method parameters:

To create a new or edit an existing item (the actual action to be performed is specified by the template settings), call the method in your script and pass values to be stored to item fields through method parameters:

IssueTracking.template_name(Param1, Param2, ...)

The template_name method returns the IssueTrackingItem program object that lets you attach files and file links to the created item:

JavaScript, JScript

Item = IssueTracking.CreateBugReportInMyProject("Test Failed", "New controls do not function properly");
Item.AttachFile("C:\\Logs\\ErrLog.txt");

Python

Item = IssueTracking.CreateBugReportInMyProject("Test Failed", "New controls do not function properly");
Item.AttachFile("C:\\Logs\\ErrLog.txt");

VBScript

Set Item = IssueTracking.CreateBugReportInMyProject("Test Failed", "New controls do not function properly")
Item.AttachFile "C:\Logs\ErrLog.txt"

DelphiScript

var
  Item : OleVariant;
begin
  Item := IssueTracking.CreateBugReportInMyProject('Test Failed', 'New controls do not function properly');
  Item.AttachFile('C:\Logs\ErrLog.txt');
end;

C++Script, C#Script

var Item;
Item = IssueTracking["CreateBugReportInMyProject"]("Test Failed", "New controls do not function properly");
Item["AttachFile"]("C:\\Logs\\ErrLog.txt");

See Also

Integration With Issue-Tracking Systems

Highlight search results