September 15, 2008

Create SilkCentral Issue on Test Run Failure

Helix ALM

Works with TestTrack 2008

Works with Borland SilkCentral Test Manager 2008

This sample uses a TestTrack trigger to create an issue in SilkCentral upon a failed test run. You'll need:
  • An existing SilkCentral installation and the necessary permissions to create issues and access their WebServices API.
  • Permissions within your TestTrack project to create executable triggers.
You'll get:
  • An automated TestTrack trigger that creates an issue in SilkCentral when a test run fails.

Download

The download contains the source files and binaries needed for this sample. Download the Create Issue on Failed Test Run zip file.
  • CreateIssue.exe - Executable built with C# .Net and Visual Studio 2005. This script handles pulling the test run information from TestTrack TCM, and creating the new isue in SilkCentral.
  • CreateIssue.bat - Batch file that acts an intermediary between the TestTrack trigger and the CreateIssue.exe.
  • Source Code - Visual Studio 2005 solution and all required source code to build the CreateIssue.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 CreateIssue.bat you just downloaded.
  1. Login to your TestTrack project.
  2. Choose Tools > Administration > Automation Rules. Click the Triggers tab.
  3. Change the Type drop-down to Test Runs.
  4. Click Add to create a new trigger. Enter a trigger name, such as Create SC Issue.
  5. Click the Trigger When tab, select After Save then Test Run enters the Failed state. This creates a trigger that executes after a test run .
    Note: this is dependent on your workflow, so if you don't have a Failed state, pick some other state.
  6. Click the Actions tab, click Add and select Run executable from the list.
  7. Enter the path to the CreateIssue.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 CreateIssue.bat to call the CreateIssue.exe with the necessary parameters. When calling CreateIssue.exe, you need to pass your SilkCentral WebServices Url, project name, username and password in plain text. For example, C:CreateIsues.exe http://myserver/services "Demo Project" admin admin

Try It

The only thing left to do is to fail a test run in TestTrack TCM. If you're using the default workflow, you can simply Quick Fail a test run, and you should get a new issue created in SilkCentral.

Tech Details and Notes

The following data is included in the issue:
  • Type is set to BUG. (hard-coded based on demo project)
  • Product is set to SilkPerformer. (hard-coded based on demo project)
  • Summary is set to the test run's summary.
  • Description is set to the test run's Steps data, with some minor formatting.
Note: Seapine does not provide support for sample triggers.