nkdAgility/azure-devops-migration-tools

[Bug]: The given key was not present in the dictionary. TestPlan

yonatani94 opened this issue · 4 comments

Version

  • I confirm that I am using the latest version

Source Version

Azure DevOps Service 2019

Target Version

Azure DevOps Service 2022

Relevant configuration

{
  "Version": "14.0",
  "LogLevel": "Verbose",
  "workaroundForQuerySOAPBugEnabled": false,
  "Source": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://azure-devops/ORG/Team/",
    "Project": "MaccabiMain",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AuthenticationMode": "AccessToken",
    "AllowCrossProjectLinking": false,
    "PersonalAccessToken": "TOKEN",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "Target": {
    "$type": "TfsTeamProjectConfig",
    "Collection": "https://dev.azure.com/ORG/",
    "Project": "MaccabiMain",
    "ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
    "AuthenticationMode": "AccessToken",
    "AllowCrossProjectLinking": false,
    "PersonalAccessToken": "TOKEN",
    "LanguageMaps": {
      "AreaPath": "Area",
      "IterationPath": "Iteration"
    }
  },
  "WorkItemTypeDefinition": {
    "sourceWorkItemTypeName": "targetWorkItemTypeName"
  },
  "GitRepoMapping": null,
  "CommonEnrichersConfig": [],
  "Processors": [
    {
      "$type": "TestPlansAndSuitesMigrationConfig",
      "Enabled": true,
      "PrefixProjectToNodes": false,
      "OnlyElementsWithTag": null,
      "TestPlanQueryBit": "PlanId in ('411060')",
      "RemoveAllLinks": false,
      "MigrationDelay": 0,
      "UseCommonNodeStructureEnricherConfig": false,
      "NodeBasePaths": [
        "Product\\Area\\Path1",
        "Product\\Area\\Path2"
      ],
      "AreaMaps": null,
      "IterationMaps": null,
      "RemoveInvalidTestSuiteLinks": true,
      "FilterCompleted": false
    }

  ],
  "Endpoints": {
      "TfsEndPoints": [
        {
          "Name": "MySource",
          "AccessToken": "TOKEN",
          "Organisation": "https://azure-devops/ORG/Team/",
          "Project": "MaccabiMain",
          "ReflectedWorkItemIdField": "ReflectedWorkItemId",
          "AuthenticationMode": "AccessToken",
          "AllowCrossProjectLinking": false,
          "LanguageMaps": {
            "AreaPath": "Area",
            "IterationPath": "Iteration"
          }
        },
        {
          "Name": "MyTarget",
          "AccessToken": "TOKEN",
          "Organisation": "https://dev.azure.com/Org/",
          "Project": "MaccabiMain",
          "ReflectedWorkItemIdField": "ReflectedWorkItemId",
          "AuthenticationMode": "AccessToken",
          "AllowCrossProjectLinking": false,
          "LanguageMaps": {
            "AreaPath": "Area",
            "IterationPath": "Iteration"
          }
        }
    ]
  }
}

Relevant log output

[16:35:38 INF] TestPlansAndSuitesMigrationContext: Plan to copy 1 Plans?
[16:35:38 INF] ===============================================================================================
[16:35:38 INF] ===============================================================================================
[16:35:38 INF] ===============================================================================================
[16:35:38 INF] ==      Suite Name: ???? ????????? ?- E2E                        =============================
[16:35:38 INF] ==            Date: 11/12/2022                                   =============================
[16:35:38 INF] ==          Suites: 2                                            =============================
[16:35:38 INF] ===============================================================================================
[16:35:38 INF] ===============================================================================================
[16:35:38 INF] ===============================================================================================
[16:35:38 INF] == Plan[1/1] Suite[0/0] Cases[0/0]  - planid[411060] | Process Plan ???? ????????? ?- E2E
[16:35:38 INF] ===============================================================================================
[16:35:39 FTL] Error while running TestPlansAndSuitesMigrationContext
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at VstsSyncMigrator.Engine.TestPlansAndSuitesMigrationContext.FindTestPlan(TestManagementContext tmc, String name) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 628
   at VstsSyncMigrator.Engine.TestPlansAndSuitesMigrationContext.ProcessTestPlan(ITestPlan sourcePlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 856
   at VstsSyncMigrator.Engine.TestPlansAndSuitesMigrationContext.InternalExecute() in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 128
   at MigrationTools._EngineV1.Processors.MigrationProcessorBase.Execute() in D:\a\1\s\src\MigrationTools\_EngineV1\Processors\MigrationProcessorBase.cs:line 47
[16:35:39 ERR] TestPlansAndSuitesMigrationContext The Processor MigrationEngine entered the failed state...stopping run
[16:35:39 INF] Application is shutting down...
[16:35:39 DBG] Hosting stopping
[16:35:39 DBG] Exiting with return code: 0
[16:35:39 INF] Application Ending
[16:35:39 INF] The application ran in

What happened?

Hey i tried to migrate a test plan with hebrew name , i already success to did it before with version 13.0.1.
i use with the latest version of this tool
and i got this message :
"The given key was not present in the dictionary."

how can i solve this error?

Debug in Visual Studio

  • Visual Studio Debug

This type of issue would require you to clone the repo and debug in Visual Studio. It should run out-of-the-box in VS 2019+ without configuration other than the config file.

Can you reproduce this with the latest version?

I'm also facing similar issue, while using 14.3 version.

image

Any suggestion on this.

Can you reproduce this with the latest version?

I solved this problem with version 13.1.1 , it was duplicate test suite name in a test plan