Thanks to everyone who joined us for the Zen Mastery of the TestTrack SDK
webinar. The recording is now available if you missed the webinar or want to watch it again. Q&A from the session follows.
You can download the slides and sample code
from this webinar.
Download in mp4 format
Q&ACan you attach a script attachment in the preconditions field in a test case?
No, because a script attachment is not an inline image. Only inline images can be added to a preconditions field, which is a custom field on test cases and test runs in a default project. Also, any test case or test run attachments that are not in the regular file attachment list are all standard file attachments. They’re added to an event or part of a custom field.
How can I add the requirements TT studio hyperlink instead of the documents?
If you remember in the last webinar, in the steps for the test case that I generated, I used a hyperlink back to the document. If you want a hyperlink back to the requirement, you need to look that up separately and you could use the get item hyperlink function, a new function in TestTrack 2011. It returns an object that contains the TT studio hyperlink and the http hyperlink, so you could use either one.
In Python, the variable name for the attachment’s filename is "m-strFileName". This generates a compile-time error because Python doesn't support hyphens in variable names. Do you have a workaround for this?
There are a couple of ways to get around that issue. The easiest is to find a library that will handle translating the TestTrack SOAP WSDL file into Python classes and functions. See the TestTrack SOAP Python tutorial
for an example of how to use the suds library. This method will likely work for simpler operations, like file attachments. However, we haven’t had any luck finding a Python library that can handle complex SOAP types. For more complex operations, like adding a workflow event, you’re pretty much forced to work with raw XML. This means building and updating the raw SOAP envelope in XML. Not ideal, but until Python gets better SOAP support that’s your best bet.