locked
MTM Can't add Requirements Suites or Run Test Cases RRS feed

  • Question

  •  

    Whenever I try to add a Requirement or Query-Based Test Suite, or run a Test Case in a particular project, I get a "Item with this key already exists". Any idea what could cause this and how to fix?

    This appeared after I had added about 50 Requirements and 50 Test Cases using Excel. It all seemed fine, then I had a power outage. Everything seemed to come up fine, but I run into the errors above - no matter the type of test (Manual/Automated,  default or configured test settings...).

    I only have a physical Environment - I have not yet configured Lab Manager (although I did see an error in the application event log referring to the Lab Manager not found...).

    I've deleted the MTM configurations files, deleted Caches all over the place, restarted everything (Servers, Agent machines, my workstation).

    Everything else seems OK: I can create and run tests in Visual Studio; I've been able to rebuild the Warehouse and Analysis Databases, I see no obvious issues in the tfs_projects database. made changes to the Work Item layout (added a new field), and added a new requirement in the transition from Live to resolved in the Workflow (Bug and Task Work Items)

    Just to add, here are the errors in the Application Event Log:

    "...The following information is part of the event: (mtm.exe, PID 3612, Thread 11) Error in IsLabConfigured. Error=TF259158: Team Foundation Server could not connect to Virtual Machine Manager. The system administrator might not have configured Lab Management in Team Foundation Server. ..."

    -and-

    "...The following information is part of the event: An item with the same key has already been added.Stack Trace ==>   at Microsoft.TeamFoundation.Client.TeamFoundationClientProxyBase.ProcessHttpResponse(HttpWebResponse response, Stream responseStream, WebException webException, XmlReader& xmlResponseReader)..."

     


    I gave up on this issue and reloaded an old snapshot. I'm back to where I wanted to be, but this problem has made me much more wary and taking much more frequent snapshots.

    • Edited by hnoell2 Wednesday, December 7, 2011 7:31 PM No solution, reloaded backup
    Monday, October 31, 2011 9:44 PM

Answers

  • Thanks for the reply, however my issues are both in trying to run a Test, or add A Requirement or Query based Suite. In adding the suites, I can search and find them, but they will not add to the Test Plan, giving me the "Key has already been Added" error.

    For the Test Case, I can create a new Test Case or add an existing Test Case to the Test Plan, but can not run it - I get "An item with the same key has already been added".

    I have verified the issue is at the server by duplicating the issue from other PCs, but using those same PCs with a different TFS server. I only have one Collection, so I'm not sure if it is a TFS level issue or at the collection level, but it does affect all projects within the collection.

    I've deleted all test cases (witadmin destroyWI), deleted all builds, first from Visual Studio then with tfsbuild destroy, verified no test runs exist in the tbl_testrun and the other tables that have a testrun ID.

    I'm at a loss as to where MTM is finding this duplicate key for adding requirement suites or running a Test Case.

    A very troublesome issue.

     


    Since I have moved on using a backup, there is no answer.
    • Edited by hnoell2 Wednesday, December 7, 2011 7:33 PM No Answer
    • Marked as answer by hnoell2 Wednesday, December 7, 2011 7:33 PM
    Thursday, November 10, 2011 10:19 PM

All replies

  • Hi hnoell2.

    Maybe your query is returning same item over once.

    Never seen this error


    Paulo T. C. Mariano
    Tuesday, November 8, 2011 1:29 PM
  • Thanks for the reply, however my issues are both in trying to run a Test, or add A Requirement or Query based Suite. In adding the suites, I can search and find them, but they will not add to the Test Plan, giving me the "Key has already been Added" error.

    For the Test Case, I can create a new Test Case or add an existing Test Case to the Test Plan, but can not run it - I get "An item with the same key has already been added".

    I have verified the issue is at the server by duplicating the issue from other PCs, but using those same PCs with a different TFS server. I only have one Collection, so I'm not sure if it is a TFS level issue or at the collection level, but it does affect all projects within the collection.

    I've deleted all test cases (witadmin destroyWI), deleted all builds, first from Visual Studio then with tfsbuild destroy, verified no test runs exist in the tbl_testrun and the other tables that have a testrun ID.

    I'm at a loss as to where MTM is finding this duplicate key for adding requirement suites or running a Test Case.

    A very troublesome issue.

     


    Since I have moved on using a backup, there is no answer.
    • Edited by hnoell2 Wednesday, December 7, 2011 7:33 PM No Answer
    • Marked as answer by hnoell2 Wednesday, December 7, 2011 7:33 PM
    Thursday, November 10, 2011 10:19 PM