是否有 11.5 版本的示例测试计划迁移配置?
Is There Sample Test Plan Migration Config for Version 11.5?
是否有版本 11.5 的示例测试计划迁移配置?
我能够迁移所有测试用例,但现在想重新创建测试计划。
对于旧版本(如版本 10),我能够在迁移所有测试用例后使用以下配置重新创建测试计划:
"Processors": [
{
"ObjectType": "MigrationTools.Core.Configuration.Processing.NodeStructuresMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": true,
"BasePaths": []
},
{
"Enabled": true,
"ObjectType": "MigrationTools.Core.Configuration.Processing.TestVariablesMigrationConfig"
},
{
"Enabled": true,
"ObjectType": "MigrationTools.Core.Configuration.Processing.TestConfigurationsMigrationConfig"
},
{
"Enabled": true,
"ObjectType": "MigrationTools.Core.Configuration.Processing.TestPlansAndSuitesMigrationConfig",
"PrefixProjectToNodes": false,
"OnlyElementsWithTag": null,
"RemoveInvalidTestSuiteLinks": true
}
]
但是,我现在遇到异常。
[22:32:54 INF] Config Found, creating engine host
[22:32:55 ERR] An Unhandled exception occured.
System.ArgumentNullException: Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at MigrationTools.Configuration.ProcessorConfigJsonConverter.Create(Type objectType, JObject jObject) in D:\a\s\src\MigrationTools\Configuration\ProcessorConfigJsonConverter.cs:line 14
我使用以下配置迁移了所有测试用例:
"Processors": [
{
"ObjectType": "WorkItemMigrationConfig",
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"BuildFieldTable": false,
"AppendMigrationToolSignatureFooter": false,
"WIQLQueryBit": "AND [System.WorkItemType] IN ('Test Case')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"Enabled": true,
"LinkMigration": true,
"AttachmentMigration": true,
"AttachmentWorkingPath": "c:\temp\WorkItemAttachmentWorkingFolder\",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": false,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"CollapseRevisions": false,
"LinkMigrationSaveEachAsAdded": false,
"NodeBasePaths": [],
"WorkItemIDs": null
}
有人可以提供一些见解吗?
谢谢,
丹尼斯
我们不断地对工具进行更改,当我们增加主要或次要的版本号时,这意味着我们进行了一些影响 configuration.json 的更改。为了简化 migration.exe init
我们将输出减少到迁移工作项所需的输出,这是最常见的用法。
如果您 运行 migration.exe init --options Full
它将为您提供可用的完整配置选项。
例如,这里是 v11.6 的配置。
{
"Version": "11.6",
"workaroundForQuerySOAPBugEnabled": false,
"WorkItemTypeDefinition": {
"sourceWorkItemTypeName": "targetWorkItemTypeName"
},
"ChangeSetMappingFile": null,
"Source": {
"ObjectType": "TeamProjectConfig",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "myProjectName",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"PersonalAccessToken": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"Target": {
"ObjectType": "TeamProjectConfig",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "myProjectName",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"PersonalAccessToken": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"FieldMaps": [
{
"ObjectType": "MultiValueConditionalMapConfig",
"WorkItemTypeName": "*",
"sourceFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
},
"targetFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
}
},
{
"ObjectType": "FieldBlankMapConfig",
"WorkItemTypeName": "*",
"targetField": "TfsMigrationTool.ReflectedWorkItemId"
},
{
"ObjectType": "FieldValueMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"targetField": "System.State",
"defaultValue": "New",
"valueMapping": {
"Approved": "New",
"New": "New",
"Committed": "Active",
"In Progress": "Active",
"To Do": "New",
"Done": "Closed",
"Removed": "Removed"
}
},
{
"ObjectType": "FieldtoFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank",
"defaultValue": null
},
{
"ObjectType": "FieldtoFieldMultiMapConfig",
"WorkItemTypeName": "*",
"SourceToTargetMappings": {
"SourceField1": "TargetField1",
"SourceField2": "TargetField2"
}
},
{
"ObjectType": "FieldtoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
{
"ObjectType": "FieldMergeMapConfig",
"WorkItemTypeName": "*",
"sourceField1": "System.Description",
"sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
"targetField": "System.Description",
"formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}",
"doneMatch": "##DONE##"
},
{
"ObjectType": "RegexFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \d{4}.(\d{1})",
"replacement": ""
},
{
"ObjectType": "FieldValuetoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
{
"ObjectType": "TreeToTagMapConfig",
"WorkItemTypeName": "*",
"toSkip": 3,
"timeTravel": 1
}
],
"GitRepoMapping": null,
"LogLevel": "Information",
"Processors": [
{
"ObjectType": "WorkItemMigrationConfig",
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"BuildFieldTable": false,
"AppendMigrationToolSignatureFooter": false,
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"Enabled": false,
"LinkMigration": true,
"AttachmentMigration": true,
"AttachmentWorkingPath": "c:\temp\WorkItemAttachmentWorkingFolder\",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": false,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"CollapseRevisions": false,
"LinkMigrationSaveEachAsAdded": false,
"GenerateMigrationComment": true,
"NodeBasePaths": [
"Product\Area\Path1",
"Product\Area\Path2"
],
"WorkItemIDs": null
},
{
"ObjectType": "TestVariablesMigrationConfig",
"Enabled": false
},
{
"ObjectType": "TestConfigurationsMigrationConfig",
"Enabled": false
},
{
"ObjectType": "TestPlansAndSuitesMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": false,
"OnlyElementsWithTag": null,
"TestPlanQueryBit": null,
"RemoveInvalidTestSuiteLinks": false,
"FilterCompleted": false
},
{
"ObjectType": "ImportProfilePictureConfig",
"Enabled": false
},
{
"ObjectType": "ExportProfilePictureFromADConfig",
"Domain": null,
"Username": null,
"Password": null,
"PictureEmpIDFormat": null,
"Enabled": false
},
{
"ObjectType": "FixGitCommitLinksConfig",
"TargetRepository": "targetProjectName",
"Enabled": false,
"QueryBit": null,
"OrderBit": null
},
{
"ObjectType": "WorkItemUpdateConfig",
"WhatIf": false,
"Enabled": false,
"WIQLQueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Shared Steps', 'Shared Parameter', 'Test Case', 'Requirement', 'Task', 'User Story', 'Bug')",
"WIQLOrderBit": null,
"WorkItemIDs": null,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"WorkItemCreateRetryLimit": 0
},
{
"ObjectType": "WorkItemPostProcessingConfig",
"WorkItemIDs": [
1,
2,
3
],
"Enabled": false,
"WIQLQueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' ",
"WIQLOrderBit": null,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"WorkItemCreateRetryLimit": 0
},
{
"ObjectType": "WorkItemDeleteConfig",
"Enabled": false,
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"WorkItemIDs": null,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"WorkItemCreateRetryLimit": 0
},
{
"ObjectType": "WorkItemQueryMigrationConfig",
"PrefixProjectToNodes": false,
"SharedFolderName": "Shared Queries",
"SourceToTargetFieldMappings": {
"SourceFieldRef": "TargetFieldRef"
},
"Enabled": false
},
{
"ObjectType": "TeamMigrationConfig",
"Enabled": false,
"PrefixProjectToNodes": false,
"EnableTeamSettingsMigration": true
}
]
}
是否有版本 11.5 的示例测试计划迁移配置?
我能够迁移所有测试用例,但现在想重新创建测试计划。
对于旧版本(如版本 10),我能够在迁移所有测试用例后使用以下配置重新创建测试计划:
"Processors": [
{
"ObjectType": "MigrationTools.Core.Configuration.Processing.NodeStructuresMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": true,
"BasePaths": []
},
{
"Enabled": true,
"ObjectType": "MigrationTools.Core.Configuration.Processing.TestVariablesMigrationConfig"
},
{
"Enabled": true,
"ObjectType": "MigrationTools.Core.Configuration.Processing.TestConfigurationsMigrationConfig"
},
{
"Enabled": true,
"ObjectType": "MigrationTools.Core.Configuration.Processing.TestPlansAndSuitesMigrationConfig",
"PrefixProjectToNodes": false,
"OnlyElementsWithTag": null,
"RemoveInvalidTestSuiteLinks": true
}
]
但是,我现在遇到异常。
[22:32:54 INF] Config Found, creating engine host
[22:32:55 ERR] An Unhandled exception occured.
System.ArgumentNullException: Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at MigrationTools.Configuration.ProcessorConfigJsonConverter.Create(Type objectType, JObject jObject) in D:\a\s\src\MigrationTools\Configuration\ProcessorConfigJsonConverter.cs:line 14
我使用以下配置迁移了所有测试用例:
"Processors": [
{
"ObjectType": "WorkItemMigrationConfig",
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"BuildFieldTable": false,
"AppendMigrationToolSignatureFooter": false,
"WIQLQueryBit": "AND [System.WorkItemType] IN ('Test Case')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"Enabled": true,
"LinkMigration": true,
"AttachmentMigration": true,
"AttachmentWorkingPath": "c:\temp\WorkItemAttachmentWorkingFolder\",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": false,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"CollapseRevisions": false,
"LinkMigrationSaveEachAsAdded": false,
"NodeBasePaths": [],
"WorkItemIDs": null
}
有人可以提供一些见解吗?
谢谢, 丹尼斯
我们不断地对工具进行更改,当我们增加主要或次要的版本号时,这意味着我们进行了一些影响 configuration.json 的更改。为了简化 migration.exe init
我们将输出减少到迁移工作项所需的输出,这是最常见的用法。
如果您 运行 migration.exe init --options Full
它将为您提供可用的完整配置选项。
例如,这里是 v11.6 的配置。
{
"Version": "11.6",
"workaroundForQuerySOAPBugEnabled": false,
"WorkItemTypeDefinition": {
"sourceWorkItemTypeName": "targetWorkItemTypeName"
},
"ChangeSetMappingFile": null,
"Source": {
"ObjectType": "TeamProjectConfig",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "myProjectName",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"PersonalAccessToken": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"Target": {
"ObjectType": "TeamProjectConfig",
"Collection": "https://dev.azure.com/nkdagility-preview/",
"Project": "myProjectName",
"ReflectedWorkItemIDFieldName": "Custom.ReflectedWorkItemId",
"AllowCrossProjectLinking": false,
"PersonalAccessToken": "",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"FieldMaps": [
{
"ObjectType": "MultiValueConditionalMapConfig",
"WorkItemTypeName": "*",
"sourceFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
},
"targetFieldsAndValues": {
"Field1": "Value1",
"Field2": "Value2"
}
},
{
"ObjectType": "FieldBlankMapConfig",
"WorkItemTypeName": "*",
"targetField": "TfsMigrationTool.ReflectedWorkItemId"
},
{
"ObjectType": "FieldValueMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"targetField": "System.State",
"defaultValue": "New",
"valueMapping": {
"Approved": "New",
"New": "New",
"Committed": "Active",
"In Progress": "Active",
"To Do": "New",
"Done": "Closed",
"Removed": "Removed"
}
},
{
"ObjectType": "FieldtoFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.Common.BacklogPriority",
"targetField": "Microsoft.VSTS.Common.StackRank",
"defaultValue": null
},
{
"ObjectType": "FieldtoFieldMultiMapConfig",
"WorkItemTypeName": "*",
"SourceToTargetMappings": {
"SourceField1": "TargetField1",
"SourceField2": "TargetField2"
}
},
{
"ObjectType": "FieldtoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "System.State",
"formatExpression": "ScrumState:{0}"
},
{
"ObjectType": "FieldMergeMapConfig",
"WorkItemTypeName": "*",
"sourceField1": "System.Description",
"sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria",
"targetField": "System.Description",
"formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}",
"doneMatch": "##DONE##"
},
{
"ObjectType": "RegexFieldMapConfig",
"WorkItemTypeName": "*",
"sourceField": "COMPANY.PRODUCT.Release",
"targetField": "COMPANY.DEVISION.MinorReleaseVersion",
"pattern": "PRODUCT \d{4}.(\d{1})",
"replacement": ""
},
{
"ObjectType": "FieldValuetoTagMapConfig",
"WorkItemTypeName": "*",
"sourceField": "Microsoft.VSTS.CMMI.Blocked",
"pattern": "Yes",
"formatExpression": "{0}"
},
{
"ObjectType": "TreeToTagMapConfig",
"WorkItemTypeName": "*",
"toSkip": 3,
"timeTravel": 1
}
],
"GitRepoMapping": null,
"LogLevel": "Information",
"Processors": [
{
"ObjectType": "WorkItemMigrationConfig",
"ReplayRevisions": true,
"PrefixProjectToNodes": false,
"UpdateCreatedDate": true,
"UpdateCreatedBy": true,
"BuildFieldTable": false,
"AppendMigrationToolSignatureFooter": false,
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"Enabled": false,
"LinkMigration": true,
"AttachmentMigration": true,
"AttachmentWorkingPath": "c:\temp\WorkItemAttachmentWorkingFolder\",
"FixHtmlAttachmentLinks": false,
"SkipToFinalRevisedWorkItemType": false,
"WorkItemCreateRetryLimit": 5,
"FilterWorkItemsThatAlreadyExistInTarget": true,
"PauseAfterEachWorkItem": false,
"AttachmentMaxSize": 480000000,
"CollapseRevisions": false,
"LinkMigrationSaveEachAsAdded": false,
"GenerateMigrationComment": true,
"NodeBasePaths": [
"Product\Area\Path1",
"Product\Area\Path2"
],
"WorkItemIDs": null
},
{
"ObjectType": "TestVariablesMigrationConfig",
"Enabled": false
},
{
"ObjectType": "TestConfigurationsMigrationConfig",
"Enabled": false
},
{
"ObjectType": "TestPlansAndSuitesMigrationConfig",
"PrefixProjectToNodes": false,
"Enabled": false,
"OnlyElementsWithTag": null,
"TestPlanQueryBit": null,
"RemoveInvalidTestSuiteLinks": false,
"FilterCompleted": false
},
{
"ObjectType": "ImportProfilePictureConfig",
"Enabled": false
},
{
"ObjectType": "ExportProfilePictureFromADConfig",
"Domain": null,
"Username": null,
"Password": null,
"PictureEmpIDFormat": null,
"Enabled": false
},
{
"ObjectType": "FixGitCommitLinksConfig",
"TargetRepository": "targetProjectName",
"Enabled": false,
"QueryBit": null,
"OrderBit": null
},
{
"ObjectType": "WorkItemUpdateConfig",
"WhatIf": false,
"Enabled": false,
"WIQLQueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] IN ('Shared Steps', 'Shared Parameter', 'Test Case', 'Requirement', 'Task', 'User Story', 'Bug')",
"WIQLOrderBit": null,
"WorkItemIDs": null,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"WorkItemCreateRetryLimit": 0
},
{
"ObjectType": "WorkItemPostProcessingConfig",
"WorkItemIDs": [
1,
2,
3
],
"Enabled": false,
"WIQLQueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' ",
"WIQLOrderBit": null,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"WorkItemCreateRetryLimit": 0
},
{
"ObjectType": "WorkItemDeleteConfig",
"Enabled": false,
"WIQLQueryBit": "AND [Microsoft.VSTS.Common.ClosedDate] = '' AND [System.WorkItemType] NOT IN ('Test Suite', 'Test Plan')",
"WIQLOrderBit": "[System.ChangedDate] desc",
"WorkItemIDs": null,
"FilterWorkItemsThatAlreadyExistInTarget": false,
"PauseAfterEachWorkItem": false,
"WorkItemCreateRetryLimit": 0
},
{
"ObjectType": "WorkItemQueryMigrationConfig",
"PrefixProjectToNodes": false,
"SharedFolderName": "Shared Queries",
"SourceToTargetFieldMappings": {
"SourceFieldRef": "TargetFieldRef"
},
"Enabled": false
},
{
"ObjectType": "TeamMigrationConfig",
"Enabled": false,
"PrefixProjectToNodes": false,
"EnableTeamSettingsMigration": true
}
]
}