Updates the fields of test set items in the specified test set.
Use the operation to update individual fields of all the test set items in a test set.
To replace the entire list of items in a test set, use the …/testsets/{Id}/items
(PUT) operation.
Authentication
Basic authentication using a user’s login and password. See Authentication for details.
Security Rights
The authenticating user must belong to a security group that has the Update privilege for Test Sets.
Request Format
To update fields of test set items, send a PATCH request to the following URL:
URL parameters
Id : integer, required
The ID of the test set, whose items’s fields you want to update.
ProjectId : integer, required
The ID of the project, to which the test set belongs.
Body parameters
In the request body, pass the RequestTestSetItemPatch
JSON object that describes the fields of test set items to be updated:
"Items": [
{
"IsActive": "boolean",
"IsStoppedOnFail": "boolean",
"AssigneeUserId": "int",
"DefaultHostId": "int",
"Seq": "int"
}
]
}
Items : array of objects, required
An array of TestSetItemPatchEntity
objects that describe test item fields to be updated.
Field values you do not specify remain unchanged.
The operation updates fields of all test set items the test set has. The objects the array contains must correspond to proper items in a test set.
To update fields of an individual test set item, use the |
IsActive : boolean
Specifies whether the test set item is enabled (active).
IsStoppedOnFail : boolean
Specifies whether the test set run will stop when the item fails.
AssigneeUserId : integer
The ID of the user to whom the item is assigned. 0 if the item is not assigned to anyone.
DefaultHostId : integer
The ID of the host to which the item is assigned. 0 if the item is not assigned to any host.
Seq : integer
The ordinal number of the item in the test set.
A sample request:
PATCH http://yourserver.com/rest-api/service/api/v1/projects/11873/testsets/182/items HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Length: 290
{
"Items": [
{
"TestId": 2678,
"IsActive": true,
"IsStoppedOnFail": true,
"AssigneeUserId": 24714,
"Seq": 1
},
{
"TestId": 2715,
"IsActive": true,
"IsStoppedOnFail": false,
"DefaultHostId": 177,
"Seq": 2
},
]
}
A sample request made by using cURL:
curl -u [email protected]:p@ssword -d @testitems.txt -H "Content-Type: application/json" -H "Accept: application/json" http://yourserver.com/service/api/v1/projects/11873/testsets/182/items
Response Format
If successful, the operation returns an empty response with HTTP status code 200.
Error responses
If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.
If the project with the specified ProjectId does not exist or the authenticating user does not have rights to access the project, the operation returns the Access is denied
error.