azure-devopsimporttestcaseazure-boards

Azure DevOps: Link Test case to User Story during bulk import


While conducting a bulk upload of test cases to Azure DevOps, I want each test case to be linked to an existing User Story with Link Type of Tested By.

Is this possible?


Solution

  • You can use the az boards work-item relation add command to link a test case to a work item.

    Example (not tested):

    az boards work-item relation add \
      --relation-type "Tested By" \
      --id $testCaseID \
      --target-id $workItemID \
      --organization $organization
    

    Values for --relation-type can be found by running az boards work-item relation list-type (list work item relations supported in the organization).