I have successfully migrated my Work Items including Test Cases using Azure DevOps Migration Tools
Now I am trying to migrate my TestPlans and TestSuites with TestPlansAndSuitesMigrationConfig
Here's my config file:
{
"ChangeSetMappingFile": null,
"Source": {
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/sourceOrg/",
"Project": "sourceProj",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "AccessToken",
"PersonalAccessToken": "redacted",
"PersonalAccessTokenVariableName": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"Target": {
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/targetOrg/",
"Project": "targetProj",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "AccessToken",
"PersonalAccessToken": "redacted",
"PersonalAccessTokenVariableName": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"FieldMaps": [],
"GitRepoMapping": null,
"LogLevel": "Verbose",
"CommonEnrichersConfig": null,
"Processors": [
{
"$type": "TestVariablesMigrationConfig",
"Enabled": true
},
{
"$type": "TestConfigurationsMigrationConfig",
"Enabled": true
},
{
"$type": "TestPlansAndSuitesMigrationConfig",
"Enabled": true,
"RemoveInvalidTestSuiteLinks": false,
"TestPlanQueryBit": "",
"UseCommonNodeStructureEnricherConfig": false,
"NodeBasePaths": [],
"AreaMaps": null,
"IterationMaps": null,
"FilterCompleted": false
}
],
"Version": "14.3",
"workaroundForQuerySOAPBugEnabled": false,
"WorkItemTypeDefinition": {
"sourceWorkItemTypeName": "targetWorkItemTypeName"
},
"Endpoints": {}
}
When I run it, I get following error:
== Plan[ 1/11] Suite[0/0] Cases[0/0] - planid[153 ] | ApplyConfigurationsAndAssignTesters Master Test Plan (All Test Cases)
2023-11-29 11:28:45.172 +05:30 [FTL] Error while running TestPlansAndSuitesMigrationContext
System.InvalidOperationException: Sequence contains more than one element
at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source)
at VstsSyncMigrator.Engine.TestPlansAndSuitesMigrationContext.FindTestPlan(TestManagementContext tmc, String name) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 627
at VstsSyncMigrator.Engine.TestPlansAndSuitesMigrationContext.ProcessTestPlan(ITestPlan sourcePlan) in D:\a\1\s\src\VstsSyncMigrator.Core\Execution\MigrationContext\TestPlansAndSuitesMigrationContext.cs:line 916
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
2023-11-29 11:28:45.178 +05:30 [ERR] TestPlansAndSuitesMigrationContext The Processor MigrationEngine entered the failed state...stopping run
I am not able to understand what is the issue. What am I missing here?
With your json file, I confirm test plan, suites, configurations..etc is successfully migrated to the target project. But if I run the same migration command again, i can produce the same error with you.
The error could be caused by the same named test plans, test suites are already in the target project. Please check on target project, delete them and if any test plan, suites are same, then try again.