September 15, 2008
Create SilkCentral Issue on Test Run Failure
This sample uses a TestTrack trigger to create an issue in SilkCentral upon a failed test run. You'll need:
Works with TestTrack 2008
Works with Borland SilkCentral Test Manager 2008
- 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.
- An automated TestTrack trigger that creates an issue in SilkCentral when a test run fails.
DownloadThe 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 TriggerYou need to create a trigger in your TestTrack project to call the CreateIssue.bat you just downloaded.
- Login to your TestTrack project.
- Choose Tools > Administration > Automation Rules. Click the Triggers tab.
- Change the Type drop-down to Test Runs.
- Click Add to create a new trigger. Enter a trigger name, such as Create SC Issue.
- 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.
- Click the Actions tab, click Add and select Run executable from the list.
- 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 ItThe 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 NotesThe 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.