微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

版本11.5是否有示例测试计划迁移配置?

如何解决版本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"
    },"ObjectType": "MigrationTools.Core.Configuration.Processing.TestConfigurationsMigrationConfig"
    },"ObjectType": "MigrationTools.Core.Configuration.Processing.TestPlansAndSuitesMigrationConfig","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\1\s\src\MigrationTools\Configuration\ProcessorConfigJsonConverter.cs:line 14

我使用以下配置迁移了所有测试用例:

  "Processors": [
    {
      "ObjectType": "WorkItemmigrationConfig","ReplayRevisions": true,"UpdateCreatedDate": true,"UpdateCreatedBy": true,"BuildFieldTable": false,"AppendMigrationToolSignatureFooter": false,"wiqlQueryBit": "AND [System.WorkItemType] IN ('Test Case')","wiqlOrderBit": "[System.ChangedDate] desc","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","FieldMaps": [
    {
      "ObjectType": "MultiValueConditionalMapConfig","WorkItemTypeName": "*","sourceFieldsAndValues": {
        "Field1": "Value1","Field2": "Value2"
      },"targetFieldsAndValues": {
        "Field1": "Value1","Field2": "Value2"
      }
    },{
      "ObjectType": "FieldBlankMapConfig","targetField": "TfsMigrationTool.ReflectedWorkItemId"
    },{
      "ObjectType": "FieldValueMapConfig","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","sourceField": "Microsoft.VSTS.Common.BacklogPriority","targetField": "Microsoft.VSTS.Common.StackRank","defaultValue": null
    },{
      "ObjectType": "FieldtoFieldMultiMapConfig","SourceToTargetMappings": {
        "SourceField1": "TargetField1","SourceField2": "TargetField2"
      }
    },{
      "ObjectType": "FieldtoTagMapConfig","formatExpression": "ScrumState:{0}"
    },{
      "ObjectType": "FieldMergeMapConfig","sourceField1": "System.Description","sourceField2": "Microsoft.VSTS.Common.AcceptanceCriteria","targetField": "System.Description","formatExpression": "{0} <br/><br/><h3>Acceptance Criteria</h3>{1}","doneMatch": "##DONE##"
    },{
      "ObjectType": "RegexFieldMapConfig","sourceField": "COMPANY.PRODUCT.Release","targetField": "COMPANY.DEVISION.MinorReleaseVersion","pattern": "PRODUCT \\d{4}.(\\d{1})","replacement": "$1"
    },{
      "ObjectType": "FieldValuetoTagMapConfig","sourceField": "Microsoft.VSTS.CMMI.Blocked","pattern": "Yes","formatExpression": "{0}"
    },{
      "ObjectType": "TreeToTagMapConfig","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",{
      "ObjectType": "TestPlansAndSuitesMigrationConfig","OnlyElementsWithTag": null,"TestPlanQueryBit": null,"RemoveInvalidTestSuiteLinks": false,"FilterCompleted": false
    },{
      "ObjectType": "ImportProfilePictureConfig",{
      "ObjectType": "ExportProfilePictureFromADConfig","Domain": null,"Username": null,"Password": null,"PictureEmpIDFormat": null,{
      "ObjectType": "FixGitCommitLinksConfig","TargetRepository": "targetProjectName","QueryBit": null,"OrderBit": null
    },{
      "ObjectType": "WorkItemUpdateConfig","WhatIf": 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,"WorkItemCreateRetryLimit": 0
    },{
      "ObjectType": "WorkItemPostProcessingConfig","WorkItemIDs": [
        1,2,3
      ],"WIQLQueryBit": "AND [TfsMigrationTool.ReflectedWorkItemId] = '' ",{
      "ObjectType": "WorkItemDeleteConfig",{
      "ObjectType": "WorkItemQueryMigrationConfig","SharedFolderName": "Shared Queries","SourceToTargetFieldMappings": {
        "SourceFieldRef": "TargetFieldRef"
      },{
      "ObjectType": "TeamMigrationConfig","EnableTeamSettingsMigration": true
    }
  ]
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。