Extensionfields - Add
Creates custom test fields based on the data provided.
POST https://vstmr.dev.azure.com/{organization}/{project}/_apis/testresults/extensionfields?api-version=7.2-preview.1
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
organization
|
path | True |
string |
The name of the Azure DevOps organization. |
project
|
path | True |
string |
Project ID or project name |
api-version
|
query | True |
string |
Version of the API to use. This should be set to '7.2-preview.1' to use this version of the api. |
Request Body
Name | Type | Description |
---|---|---|
body |
NewFields is an array of type CustomTestFieldDefinition. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
successful operation |
Security
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
Name | Description |
---|---|
vso.test_write | Grants the ability to read, create, and update test plans, cases, results and other test management related artifacts. |
Definitions
Name | Description |
---|---|
Custom |
Data structure which stores details for the customTestFields to be updated |
Custom |
Artifact to which customTestField will be set. |
Custom |
Data type of the customTestField. |
CustomTestFieldDefinition
Data structure which stores details for the customTestFields to be updated
Name | Type | Description |
---|---|---|
fieldId |
integer |
ID assigned to the custom test field upon creation, should be left empty when creating. |
fieldName |
string |
The name of custom field cannot be longer than 50 characters (spaces, numbers, and special characters are not allowed) and must be unique in the project. The names are case insensitive. |
fieldType |
Data type of the customTestField. |
|
scope |
Artifact to which customTestField will be set. |
CustomTestFieldScope
Artifact to which customTestField will be set.
Name | Type | Description |
---|---|---|
all |
string |
|
none |
string |
|
system |
string |
Reserved for internal Azure DevOps functionality. Not to be used. |
testResult |
string |
Custom field can be used with TestResult artifact. |
testRun |
string |
Custom field can be used with TestRun artifact. |
testRunAndTestResult |
string |
Custom test field can be used with either TestRun or TestResult artifact. |
CustomTestFieldType
Data type of the customTestField.
Name | Type | Description |
---|---|---|
bit |
string |
Boolean data type. |
dateTime |
string |
Datetime data type. |
float |
string |
Floating integer data type. |
guid |
string |
Unique identifier data type. |
int |
string |
Integer data type. |
string |
string |
String data type. |