TestComplete 4 Sneak Peek - Issue Tracking Integration

How nice would it be to be able to post a bug entry directly from TestComplete 4 if a test fails? Now, you can easily post bug reports or create items of any other type in issue-tracking systems from the context menu of the test log window or directly from a script. You can create a bug report for the entire log of the test run or for any of its child logs. Currently, TestComplete 4 supports both AutomatedQA's AQdevTeam and Microsoft's Visual Studio 2005 Team System issue-tracking systems, but more integrations are planned in the future.


TestComplete 4 uses Issue Tracking Templates to customize bug reports posted from the Test Log. Of course, other items can be posted as well, not just bug reports from the Test Log. The Issue Tracking Template defines the names used to address in scripts, the connection to be used, the action (create or edit) and the mapping settings between the template fields and item fields. The adding, editing and deleting of templates is handled by the Template Manager which has a user friendly layout. Below is a screenshot showing an Issue Template configuration for Microsoft's Visual Studio 2005 Team System.


Template Configuration

Connections to AutomatedQA's AQdevTeam or Microsoft's Visual Studio 2005 Team System are controlled by the Connection Manager. Using this manager you can add, delete and modify properties of the connections.

Click to display image
Connections Manager

There are two ways to post issues to AutomatedQA's AQdevTeam or Microsoft's Visual Studio 2005 Team System: directly from a test script or by right clicking on the test log and selecting the Create Issue item from the context menu. From scripts, you can use the IssueTracking object for posting issues. The IssueTracking object provides the AttachFile (which is used to attach files to the issue that is posted) and AttachFileLink (which is used to attach file links to the issue that is posted) methods.

In the script example below, the With IssueTracking.CreateNewItem ("Failed TestComplete Test", "See the attached file for details.", "Build 4.0.1090") line controls which information gets posted to fields in AQdevTeam. The "Failed TestComplete Test" section represents the Subject field, the "See the attached file for details." represents the Description field and the "Build 4.0.1090" represents the Build field.

The calls to methods of the IssueTracking object does not depend on the issue-tracking system. Although the code below was written for AQdevTeam, it can also be used to post items to the Microsoft's Visual Studio 2005 Team System database. To do this, you need to use another connection through the Connection Manager and the field mappings through the Issue Tracking Template.


Example Script Lines

Sub CheckResults
  If Log.ErrCount > 0 Then
   d = Utilities.FormatDateTime("yyyymmdd_hhnnss", Now)
   FileName = "C:TempResults_" + d + ".xml"
   Log.SaveResultsAs FileName

   With IssueTracking.CreateNewItem("Failed TestComplete Test", "See the attached file for details.", "Build 4.0.1090")
    AttachFile FileName
   End With
  Else
   Log.Message "No errors occurred."
  End If
End Sub


When you select Create Issue from the context menu of the script log, the entire log or child log is posted as an issue, which would include any attached files or file links.

Click to display image
Create Issue from the Context Menu of the Script Log

In the following screenshot, an issue has been posted from TestComplete 4 to Microsoft's Visual Studio 2005 Team System. The TestComplete 4 test failed due to errors that occurred. The test results and errors are logged into the Test Log of TestComplete 4, which through the Issue Tracking integration, these results are exported to the File Attachments tab of Microsoft's Visual Studio 2005 Team System.

Click to display image
Microsoft Visual Studio 2005 Team System

With this integration, users can automatically post errors captured directly from TestComplete 4 or manually post the errors after reviewing the Test Log. Either way, you can see how valuable such an integration is to the development lifecycle. Stay tuned for more TestComplete 4 features and enhancements.


Close

By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading

Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox