Skip to main content

Create test case

Create a Test Case work item with numbered steps (action and expected result), optionally added to a suite.

Command in the Azure DevOps toolkit · id ooa.azure_devops/create_test_case · 13 inputs (4 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
Organization address (URL)StringYesOrganization or collection address, e.g. https://dev.azure.com/contoso, or https://devops.contoso.local/tfs/DefaultCollection for Azure DevOps Server.
Personal access tokenCredentialYesPersonal access token from the vault, with the scopes this action needs (e.g. Work Items read and write); a Microsoft Entra ID token works too. Or leave it empty and choose a connection that signs in, which gets and renews the token.
ProjectStringYesProject name, e.g. Finance Portal.
TitleStringYesTest case title.
StepsListNoSteps in order: text, or {"action": ..., "expected": ...}, e.g. [{"action": "Open the invoice", "expected": "Total shows 120.50"}].
FieldsDictionaryNoOther fields, e.g. {"priority": 2, "area_path": "Finance Portal"}.
Plan IDNumberNoAdd the new test case to this plan's suite (with suite_id).
Suite IDNumberNoSuite to add it to.
Area pathStringNoArea path; the project's root area when empty.
Iteration pathStringNoIteration (sprint) path; the project's root iteration when empty.
PriorityNumberNoPriority from 1 (highest) to 4 (lowest); 2 in new steps (G5).
Automation statusStringNoWhether the test is automated: Not Automated, Planned or Automated.
Steps tableTableNoThe steps as a table with the columns action and expected, one row per step (G5); used instead of steps.

Outputs​

OutputTypeWhat it is
idNumberWork item id of the test case.