June 23, 2009

TestTrack SDK Helpful Tip - Getting Started

Helix ALM
As a member of the services team, I find myself using the SOAP-based TestTrack SDK quite often. In the process, I have learned very valuable lessons that I want to share with you. My goal is to post helpful hints like the ones below, and then incorporate them into the best practices article on the Seapine labs. So let's start at the beginning. Before you start programming, there are some things to think about. What are you trying to accomplish? While the SDK is very robust, it cannot do everything. The SDK is mainly for working with items, like defects, test cases, and test runs. It is not for configuration. For example, you cannot create a project, set project options, configure the workflow, etc. with the SDK. The most configuration you will be able to do with the SDK is add values to a pop-up menu. Language of choice? Since the SDK is SOAP-based, you have a lot of choices for the language. Choose wisely! You will be tempted to choose a language that you are comfortable with, but it may be one that requires more work. Let's take Python, for example. You can write SOAP with Python, but it requires you to create the XML files to submit a request and then read the XML file to get the response. With something like Java, you only need a couple of lines to accomplish what would take you tens of lines. Sometimes, however, depending on the specific situation, you do not have a choice. Web Server The SOAP SDK is a web service, so that means you will need a web server. If you are successfully running the web client, then the same web server should be able to successfully run the SOAP SDK as well. Each web server and each version of the web server may require different settings. For example, in IIS 6 (and probably later) you have to add the MIME type to handle WSDL files, otherwise you will get a 404 error. The actual API is an executable CGI that by default resides in the scripts alias. Just like the TestTrack Web CGI. If you are able to reference the WSDL but cannot connect to the ttsoapcgi.exe, you may need to review the TestTrack installation guide, specifically the instructions for setting up the script alias in the web installation section. Installing the SDK There isn't a separate installer for the TestTrack SOAP SDK; it is part of the server installer. One of the options in the installer is "TestTrack Server installation with Web and SOAP components". But chances are you have already installed TestTrack, or you may want to run the SDK on a web server on a separate machine from the TestTrack Server, and you'd rather not reinstall everything. In that case, run the TestTrack installer and choose "Custom installation" instead.  On the next window, you can select to only install the SOAP components. During the install you will be prompted to enter the TestTrack Server and port number information. Getting Help Hopefully, these posts will be of great help to you. But there are other resources you can use: SDK Page on the Seapine labs: http://labs.seapine.com/TestTrackSDK.php More information on getting started: http://labs.seapine.com/SDKStart.php SDK documentation - complete documentation of all the requests and types. http://labs.seapine.com/SDKDocs/2009/TTSOAP2009.html Language-specific tutorials: http://labs.seapine.com/wiki/index.php/Category:TestTrack_SDK_Tutorials SDK examples: http://labs.seapine.com/wiki/index.php/Category:SDK_Examples Examples using TestTrack triggers: http://labs.seapine.com/wiki/index.php/Category:Triggers_-_TestTrackShare your knowledge! Last thing I want to mention is that you can also post examples. The labs page is meant to be more of a community for Seapine users. You can register, create an account, and post any articles that you feel would help other users. Maybe there isn't a tutorial for your language of choice or you want to add information to an existing article. Feel free to add to what is already there or create a new article.