收到消息“序列包含多个元素”

问题描述 投票:0回答:1

我正在运行 Json 脚本来传输测试计划并收到此错误。如何解决或调试这个问题。

"Sequence contains more than one element"

    {
"ChangeSetMappingFile": null,
"Source": {
"$type": "TfsTeamProjectConfig",
"Collection": "http://alpvbhnptfsa01.ent.bhicorp.com:8080/tfs/XXX/",
"Project": "XXXXX",
"ReflectedWorkItemIDFieldName": "Microsoft.VSTS.Build.IntegrationBuild",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "Prompt",
"PersonalAccessToken": "",
"PersonalAccessTokenVariableName": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"Target": {
"$type": "TfsTeamProjectConfig",
"Collection": "https://dev.azure.com/XXXXXXXX/",
"Project": "XXXXXXXXXX",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"AuthenticationMode": "AccessToken",
"PersonalAccessToken": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"PersonalAccessTokenVariableName": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"FieldMaps": [
{
"$type": "MultiValueConditionalMapConfig",
"WorkItemTypeName": "*",
"sourceFieldsAndValues": { "System.State": "New" },
"targetFieldsAndValues": { "Microsoft.VSTS.Common.ActivatedDate": null, "Microsoft.VSTS.Common.ActivatedBy": null, "Microsoft.VSTS.Common.ClosedDate":null, "Microsoft.VSTS.Common.ClosedBy": null}
}
],
"GitRepoMapping": null,
"LogLevel": "Debug",
"CommonEnrichersConfig": null,
"Processors": [
{
"$type": "TestVariablesMigrationConfig",
"Enabled": true
},
{
"$type": "TestConfigurationsMigrationConfig",
"Enabled": true
},
{
"$type": "TestPlansAndSuitesMigrationConfig",
"Enabled": true,
"PrefixProjectToNodes": false,
"OnlyElementsWithTag": null,
"TestPlanQueryBit": null,
"RemoveAllLinks": false,
"MigrationDelay": 0,
"UseCommonNodeStructureEnricherConfig": false,
"NodeBasePaths": [],
"AreaMaps": null,
"IterationMaps": {},
"RemoveInvalidTestSuiteLinks": false,
"FilterCompleted": false
}
],
"Version": "14.4",
"workaroundForQuerySOAPBugEnabled": false,
"WorkItemTypeDefinition": {
"sourceWorkItemTypeName": "targetWorkItemTypeName"
},
"Endpoints": {
"InMemoryWorkItemEndpoints": [
{
"Name": "Source",
"EndpointEnrichers": null
},
{
"Name": "Target",
"EndpointEnrichers": null
}
]
}
}   
azure-devops devops azure-devops-migration-tools
1个回答
0
投票

我已经检查了configuration.json文件,它应该是正确的。

“序列包含多个元素”

当目标项目的测试计划、测试套件和测试用例与正在迁移的项目同名时,我遇到了同样的问题。

enter image description here

要解决这个问题,需要查询源项目和目标项目中的所有测试计划、测试套件和测试用例,然后检查是否有同名的标题。

如果是,则需要更改源或目标项目中测试工作项的标题。然后您可以重新运行迁移命令来迁移测试工作项。

您需要确保迁移的测试工作项的标题是唯一的。

参考迁移工具开发者的回答:Azure DevOps Migration Tools 的 TestPlansAndSuitesMigrationConfig 中的问题

© www.soinside.com 2019 - 2024. All rights reserved.