Forum Discussion

Colin_McCrae's avatar
Colin_McCrae
Community Hero
11 years ago

Updating multiple TFS items from TestComplete?

Not sure if I'm missing something here .....



I can create a connection template to an existing bug/case (which I'll call an "item" from here on in) in TFS (all our project work is managed in TFS). I can then update fields in that item via script.



But is it possible to change the item it connects to?



It seems I have to specify the item ID in the connection template and there is no way to make that variable? I tried setting it to a project variable, but that didn't work.



All I need it to do is connect to various different items so I can add a note to them to say that an automated run was performed and add a pass/fail note to the item.



The item to be updated will be known by my test script. But I need to be able to update numerous different items. It's absolutely not practical to create a template for every single item - we are potentially talking about hundreds of different ones.



Following on from that - when I do connect to, and send updates to, an item - it appears to over-write whatever text was already in that field. Is it possible to append rather than over-write?



I've had a look through the help topics on the IssueTracking object but I'm not finding any answers to the above.



Anyone have any helpful tips?
  • Have now implemented a .NET DLL provided by someone else in the office doing some work porting things from other project/bug management systems into TFS.



    Using this I can now append to any task ID I like. In any field within the task. And can append or overwrite. I get a return code back indicating success or failure. All via parameters provided to my code during the run. And without having to create any cumbersome manual connection templates.



    So I can update TFS properly. On the fly. During a run. Easily.



    Result.
  • I've been playing about with this all morning and I can't find any way of doing this without creating a new template for every single task/bug I want to update.



    Which is crazy. No-one in their right mind would use it this way?!?!?



    Surely you use the wizard to connect to a project (which it does) but the individual item you want to connect to can be a parameter? How else (without creating hundreds of templates) are you supposed to edit multiple items?!?!?



    This is SOOOOO close to doing what I need it to do, but having to specify the item ID as part of the connection wizard is a total blocker. I can live with over-write rather than append, but I have to be able to set the item ID myself in code or this is a non-starter.



    Hoping for some staff input here that gets me round this .....
  • ** BUMP **



    Tanya?



    If this isn't something that's currently possible, can I have a suggestion added that the task ID is a parameter?



    From what I know of TFS, it performs a query at every level of filtering so there would still be a delay while the query was applied to fetch the task during runtime. But ..... it would make this SO much more usable. As it is, the TFS connection, although easy to use, is very little use against existing tasks.



    Can I also have an "append" option/flag when it's an edit rather than an add as well please. (Suggestion no.2)
  • ** BUMP **



    Still hoping for some staff input. Even if it's just to acknowledge the suggestion.



    TFS integration is a BIG thing in my office now. Management here want everything integrated into it as heavily as possible and the (as far as I can tell) limited integration via TestComplete is not in it's favour. :(