Forum Discussion

dzrtfox's avatar
dzrtfox
Contributor
14 years ago

Integration with TFS Source Control

Hi,

I am having a couple of issues with using TestComplete inside of our TFS setup (although I suspect this is an issue with other source control systems as well...) 



I have a test project inside of our main application solution that contains individual .tc8Test files for each of my Test Items in my TestComplete project.  Each of these tests is associated with a Test Case in TFS.  I also have the TestComplete project saved in a separate folder in source control.



One issue arises when I want to add a new test to my test project.  If I write a new routine in TestComplete and add a new Test Item to the TestComplete project, then add a new .tc8Test file to our test project, I have to go into each existing .tc8Test file and refresh it so it "sees" the new tests.  If I do not do this, I get an error message when I try to run automation that says "TestComplete project changed" and the tests do not run.



This is made worse by the fact that after I refresh each one I have to individually uncheck all Test Items except the one I want to run.  I cannot uncheck the main project in the tree (which unchecks all child test items).  If I uncheck the main project, the test does not run.  (See the attached screenshot for an image of what I mean...)



Are there any workarounds for this?  My list of tests is growing daily and it is way too time-consuming to have to refresh every existing test just to add a few new ones...



Thanks!!

 


6 Replies

  • So has anyone had any experience with integrating TFS/TestComplete?  Surely I'm not the only one experiencing this... 
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    I'm interested in your solution that you get as we are looking at integrating our testing with TFS here as well.  However, perhaps an insight into the problem you're having with refreshing:



    If you take a look at the .MDS file for the TestComplete project that you're adding TestItems to, you'll note that there is an index number for each test item.  If you simply add test items to the end of your test project, each new test item simply gets the next index.  If, however, you insert test items between two pre-existing, within the MDS file these indices are re-ordered.  I'm not certain what is happening behind the scenes with the TC8Test object but I suspect that this indexing is playing a part in how things are matched up in TFS.



    A suggested work around to try and see if it resolves...  Since, technically, it doesn't matter the order the test items have in your TC project, simply add new tests to the end of the project rather than inserting them in a particular order.  Then you add new TFS test items for each new test case and order them appropriately using Ordered Tests within TFS.



    Let me know if this works for you as it will probably be the way we do things on our environment as well.
  • Thank you very much for your reply Robert!!



    I will try your idea this morning and let you know how it goes.  Overall I am pretty happy with the way TestComplete fits into our TFS system although it has taken a little bit of tweaking to get everything working how we need it.  We use automated builds, Lab Management, and most of TFS' other "bells & whistles", and for the most part TestComplete fits in very well.



    This issue with adding test cases is the biggest obstacle I've faced to this point, and so far I've been unable to find a workaround.  I will let you know how it goes though!!

     
  • Grrrr I finally was able to get around to trying this over the weekend and unfortunately it doesn't work.  Adding the additional test items to the end of my existing list makes no difference...   I get a "TestComplete project changed" error for all of my existing test cases and they do not execute. 



    To make matters worse, my test case list is growing and unchecking the project node (see the screenshot from my initial post) also prevents the test case from running.  So for every new test I add, I have to open every existing test, refresh the project, then manually uncheck every case in the list except for the one I need to run.  This is prone to error and is very time-consuming.  It also forces me to add my test cases in large batches rather than for each case I script.



    Please put this near the top of your list of feature requests!!  I believe that TFS is the future of software development and TestComplete is the ultimate in terms of automated testing, but if this isn't fixed you are much better sticking with CodedUI (if you can afford it...)
  • My apologies, that last sentence came out wrong...  I meant you are better off sticking with CodedUI if you can afford it and are planning on integrating with TFS.



    TestComplete is light years ahead of CodedUI Test in terms of what it can do...
  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)

    Hello Charles,





    Please see our reply in this SQAForums thread.