-
Hello community, I am trying to migrate one particular test plan out of the 45 in my project. That test plan consists of a large number of test suites, which have a total of around 2000 test cases. I am unable to tell the Migration Tools to migrate only that specific test plan. The Tools seem to always want to migrate all 45 test plans, regardless of the TestPlanQueryBit I am using. Here is the full migration script (with some anonymized values): {
"Serilog": {
"MinimumLevel": "Information"
},
"MigrationTools": {
"Version": "16.0",
"Endpoints": {
"Source": {
"EndpointType": "TfsTeamProjectEndpoint",
"Collection": "https://...",
"Project": "....",
"Authentication": {
"AuthenticationMode": "AccessToken",
"AccessToken" : "..."
},
"ReflectedWorkItemIdField": "TfsMigrationTool.ReflectedWorkItemId",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
},
"Target": {
"EndpointType": "TfsTeamProjectEndpoint",
"Collection": "https:/...",
"Project": "...",
"Authentication": {
"AuthenticationMode": "AccessToken",
"AccessToken" : "..."
},
"ReflectedWorkItemIdField": "TfsMigrationTool.ReflectedWorkItemId",
"LanguageMaps": {
"AreaPath": "Area",
"IterationPath": "Iteration"
}
}
},
"Processors": [
{
"ProcessorType": "TfsTestVariablesMigrationProcessorOptions",
"Enabled": true,
"SourceName": "Source",
"TargetName": "Target"
},
{
"ProcessorType": "TfsTestConfigurationsMigrationProcessorOptions",
"Enabled": true,
"SourceName": "Source",
"TargetName": "Target"
},
{
"ProcessorType": "TfsTestPlansAndSuitesMigrationProcessorOptions",
"Enabled": true,
"PrefixProjectToNodes": false,
"OnlyElementsWithTag": null,
"TestPlanQueryBit": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.Id] = 50551 ORDER BY [System.ChangedDate] desc",
"RemoveAllLinks": false,
"MigrationDelay": 0,
"UseCommonNodeStructureEnricherConfig": false,
"NodeBasePaths": [],
"AreaMaps": null,
"IterationMaps": null,
"RemoveInvalidTestSuiteLinks": false,
"FilterCompleted": false,
"SourceName": "Source",
"TargetName": "Target"
}
],
"CommonTools": {
"TfsChangeSetMappingTool": {
"Enabled": false,
"ChangeSetMappingFile": ""
},
"TfsTeamSettingsTool": {
"Enabled": false
},
"TfsGitRepositoryTool": {
"Enabled": true,
"Mappings": null
},
"FieldMappingTool": {
"Enabled": true,
"FieldMaps": []
},
"TfsNodeStructureTool": {
"Enabled": true,
"Areas": {
"Filters": [],
"Mappings": { I have tried about every variant of TestPlanQueryBit possible. The documentation on how to structure this is, unfortunately, not clear to me: It seems to refer to the "classic" Migration Tools version, not the latest. And in the field definition is says "When provided, this partial query is added after Here are some variants that I tried. Full WIQL query: "TestPlanQueryBit": "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @TeamProject AND [System.Id] = 50551 ORDER BY [System.ChangedDate] desc", Just the section starting with the first AND "TestPlanQueryBit": "AND [System.Id] = 50551 ORDER BY [System.ChangedDate] desc", Without the AND keyword "TestPlanQueryBit": "[System.Id] = 50551 ORDER BY [System.ChangedDate] desc", Without the ORDER BY "TestPlanQueryBit": "AND [System.Id] = 50551", Just the keyword planId (since I read about this syntax in an older discussion thread) "TestPlanQueryBit": "planId = 50551", Using PlanName as mentioned in the documentation "TestPlanQueryBit": "PlanName = 'the name of the test plan'", Adding square brackets to PlanName "TestPlanQueryBit": "[PlanName] = 'the name of the test plan'", Adding the System. prefix with square brackets "TestPlanQueryBit": "[System.PlanName] = 'the name of the test plan'", Adding the System. prefix without square brackets "TestPlanQueryBit": "System.PlanName = 'the name of the test plan'", And just out of curiosity, something that should throw an error but does not... "TestPlanQueryBit": "slfkjlslksjfslkfjsl", I have also tried adding the above full WIQL query as part of a TfsWorkItemMigrationProcessor in combination with the TfsTestPlansAndSuitesMigrationProcessor but I always get the same result: Does anyone know the syntax for using the TestPlanQueryBit field? From what I can see, this fields does not seem to be evaluated. Am I completely on the wrong track here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There is no These are the valid options. Only the Options List and the Examples sections have up-to-date samples. All other samples are illustrative and may have outdated parameters.
You can use |
Beta Was this translation helpful? Give feedback.
There is no
TestPlanQueryBit
option. Please follow https://nkdagility.com/learn/azure-devops-migration-tools/Reference/Processors/TfsTestPlansAndSuitesMigrationProcessor/These are the valid options. Only the Options List and the Examples sections have up-to-date samples. All other samples are illustrative and may have outdated parameters.
You can use
"TestPlanQuery": "PlanName = 'ABC'"
!