skip to Main Content

In Azure Devops while creating queries. anybody knows what is the use of ‘Query Text’ Parameter?

Not able to figure out what is this used for

2

Answers


  1. It is related to Test Suite:

    Field used to capture the query defined for a Query-based suite type.

    Reference name=Microsoft.VSTS.TCM.QueryText, Data type=PlainText

    as described here https://learn.microsoft.com/en-us/azure/devops/boards/queries/build-test-integration?view=azure-devops#other-fields

    Login or Signup to reply.
  2. @GregL has mentioned the Query Text parameter in doc:Build and test integration queries – Azure DevOps | Microsoft Learn. Here is using example to understand the conception well.

    1 create query based suit in Test Plans menu.
    query based suit

    2 config filters and create suite .(query work items based on field Work Item Type match with group Microsoft.TestCaseCategory)

    config filters

    Note: you can transform to WIQL syntax and it is Query text. Refer to doc:WIQL

    select 
    [System.Id], 
    [System.WorkItemType], 
    [System.Title], 
    [Microsoft.VSTS.Common.Priority],
     [System.AssignedTo], 
    [System.AreaPath] 
    from WorkItems 
    where [System.TeamProject] = @project 
    and [System.WorkItemType] in group 'Microsoft.TestCaseCategory'
    

    3 query work items base on a filed Query Text match with a previous value [System.Title] or other word included in query text in step 2. Path:Board->Queries->New Query
    query

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search