Is it possible to enter a new defect in Issue Manager using an external tool?



Is it possible to enter a new defect in Issue Manager using an external tool?


Yes. Any tool that is SOAP compliant can use the SilkCentral Issue Manager open API. There is an overview and description of the SOAP API in chapter 6 of the Issue Manager User Guide. To review this choose:


You can get a list of all webservices available in the API by choosing either

http://IM_FrontEndServerName/serviceshttp://IM_FrontEndServerName:19120/services*where IM_FrontEndServerName is the name of the IM Front End Server box. The url used is dependent on the web server you are using.

Below you will see how to create new issues using different tools. These tools are .Net Explorer, SilkPerformer & a standalone application.

Using .Net Explorer

To enter a new defect invoke the following methods:

You can see in the left pane the list of invoked methods.

  • LogonUser takes the IM user name and password as input params and returns a session id.
  • GetProjects takes the session id as an input param and returns all project id"s for this user
  • GetIssueTypes takes the session id and a project id as input params and returns all Issue Types
  • And so on.......
  • Finally the SaveNewIssue requires the output params of the previous methods as input params. You can also at this point add a description and synopsis for your defect. This method returns the new defect number that was created, in this case defect number 11.

Note - If you already know the project id, Issue Type etc then all you need to invoke is the LogonUser and SaveNewIssue methods.

Using the SilkPerformer Web API

We can export our project from .Net Explorer into SilkPerformer as either a web or .Net based project. If we choose web we can see the actual SOAP requests in the script and can therefore customize certain parameters such as "Product", "Platform", "Severity" etc thus allowing us to insert issues depending on specific components (see Fig.2).

Fig. 2 Sample SOAP code from a SilkPerformer web based script with "product" customized.

The benefit of being able to customize the parameters is that you can perform some tests within your own application and if you discover a new issue then have your tool output the specifics on the issue (e.g. platform, severity, and component) to a text file. At this point kick off a batch file that starts SilkPerformer and use the script to read the text file, insert these parameters where required in the SOAP request and post this off to SCIM. This allows a simple automated approach to defect tracking although for a complete QA platform for automated testing, results analysis and defect tracking use SilkCentral Test Manager.

Using SilkPerformer .Net framework

The other possibility here is to export the project as a .Net based project from within .Net Explorer. This will produce a .Net based script with calls to a dll that is created during compile time/export (see Fig. 2). This dll contains the web service calls that when invoked will create a new issue. The difference with this approach compared to a web based script is that we will use the .Net Framework to build the SOAP request and to parse the server response. The benefit of this approach is that you can then open the project in Visual Studio.NET and from within that environment create new defects in SCIM.

Fig. 3 .Net based SilkPerformer script which calls a .dll file that contains the web service calls.

It is also possible to customize the values in the .Net script by specifying in .Net Explorer that you want to use Project Attributes as input parameters for objects. To do this simply choose to create a new global variable in the Objects pane, give the variable a name and ether provide an initial value or file to read from (See Fig.4).

Fig.4 - Creating a variable and later use as a project attribute.

Once you"ve defined the variable you can then specify that you want to use the variable as a project attribute (Fig.5)

Fig.5 - Once created, make the variable a project attribute.

This attribute will be exported with the project and can then allow users to change the input parameter to this object. If you want you can create a variable for each input parameter of every object within the test and use them all as project attributes. You can change the values for these using either SilkPerformer or Visual Studio.NET. To do this in SilkPerformer simply open the project and choose PROJECT | PROJECT ATTRIBUTES. (Fig.6).

Fig. 6 - "Product" project attribute has a default input param of "SilkPerformer"

To change this in Visual Studio.Net you need to specify the attribute in your C# code using Bdl.AttributeGet or Bdl.AttributeSet functions. For more information on this consult the .Net Framework Developers Guide that ships with SilkPerformer.

The similarity between both methods shown above is that they both send the requests to the SCIM API as SOAP calls over HTTP. The difference is that while one can be customized within SilkPerformer (QA Environment) the other can be customized with Visual Studio (Development Environment).

Using a standalone application

The next approach to be demonstrated is using a standalone application to add a new issue. .Net Explorer also allows you to compile your methods into a standalone application. This is a .Net based executable that contains the necessary dll"s and config files in order to run successfully. If you wanted to change the parameters (e.g. product) then you could open the application in Visual Studio, make changes to it and then re-compile it. Alternatively you could implement some input fields in you application to allow the user to specify the different components required for SCIM. To build a standalone application using .Net explorer choose EXPORT | STANDLAONE APPLICATION.

Old KB# 23721
Comment List
Related Discussions