Updates a test set.
Use the operation to replace contents of an existing test set in QAComplete with new contents.
To update individual fields of an existing test, use the …/testsets/{Id} (PATCH)
operation.
To replace the test set items (tests) that the test set has, use the …/testsets/{Id}/items
(PUT) operation.
To add a new test set, use the …/testsets (POST)
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 the test set, send a PUT request to the following URL:
URL parameters
ProjectId : integer, required
The ID of the project to which the test set belongs.
Id : integer, required
The ID of the test set to update.
Body parameters
In the request body, pass the RequestTestSetPut
JSON object that describes the test set’s new contents:
"Title": "string",
"FolderId": "int",
"IsSequential": "boolean",
"AssigneeUserId": "int",
"StatusCode": "string",
"PriorityCode": "string",
"ExecutionType": "string",
"Description": "string",
"OwnerUserId": "int"
}
The property values you do not specify are set to their default values.
Some string property values (for example, StatusCode
) are based on the choice lists defined in your QAComplete project. You can find these values in the Test Management > Test Sets > Actions > Manage Choice Lists panel in QAComplete.
Title : string, required
The title (name) of the test set. Cannot be empty.
FolderId : integer
The ID of the folder to which the test set belongs.
IsSequnetial : boolean
Specifies whether the tests in the test set will run in sequence.
AssigneeUserId : integer, required
The ID of the user to whom the test set is assigned. 0 if the test set is not assigned to anyone.
StatusCode : string, required
The test set status. Possible values are based on the choice list.
PriorityCode : string, required
The test set priority. Possible values are based on the choice list.
ExecutionType : string, required
Specifies how the test set will run. Possible values are based on the choice list.
Description : string
The test set description. Can include an HTML markup.
OwnerUserId : integer, required
The ID of the user who owns the test set.
A sample request:
PUT http://yourserver.com/rest-api/service/api/v2/projects/11873/testsets/182 HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Length: 184
{
"Title": "Test Set A",
"IsSequential": true,
"AssigneeUserId": 24718,
"StatusCode": "New",
"PriorityCode": "3-Low",
"ExecutionType": "Automated",
"OwnerUserId": 25264
}
A sample request made by using cURL:
curl -u [email protected]:p@ssword -d @testset.txt -H "Content-Type: application/json" -H "Accept: application/json" http://yourserver.com/service/api/v2/projects/11873/testsets/182
Response Format
On success, the operation responds with HTTP status code 200 and returns a JSON object with the updated test information.
A sample response:
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 1142
{
"id": 182,
"project_id": 11873,
"folder_id": 0,
"create_user_id": 25264,
"update_user_id": 25264,
"owner_user_id": 25264,
"assignee_user_id": 24718,
"title": "Test Set A",
"is_active": true,
"is_sequential": true,
"status_code": "New",
"priority_code": "3-Low",
"execution_type": "Automated",
"description": "",
"date_created": "2015-07-31T10:19:10.5870000",
"date_updated": "2015-09-09T09:28:27.0000000",
"assigned_to_name": "Brown, Jane",
"user_name": "Smith, John",
"owner_name": "Smith, John",
"nbr_tests": 2,
"last_run_status": "Passed",
"last_run_date": "2015-09-06T10:53:07.0000000",
"last_run_by_user_id": 25264,
"last_run_by_name": "Smith, John",
"nbr_times_run": 2,
"avg_run_time": 0,
"avg_run_time_formated": "00:00:00",
"nbr_files": 0,
"nbr_notes": 0,
"last_run_release_id": 204,
"last_run_release_name": "Internal BETA Release",
"last_run_test_config_id": 114,
"last_run_test_config_name": "Configuration A",
"allow_run": true,
"nbr_schedules": 1
}
Metadata about the test set list.
Pagination information about the test set list. (See Paging Through Results Using Offset and Limit).
The number of returned test sets.
The offset of the first test set requested.
The maximum number of test sets requested.
The total number of test sets.
The authenticating user’s rights to access test sets.
Access rights:
- 0 - None
- 1 - Read
- 2 - Update
- 3 - Read and update
- 4 - Delete
- 5 - Read and delete
- 7 - Full access
An array of test sets.
The ID of the project to which the test set belongs.
The date when the test set was created.
The date when the test set was last modified.
The ID of the user who created the test set.
The ID of the last user who modified the test set.
The number of files attached to the test set.
The unique identifier of the test set.
Specifies how the test set will run. Possible values are based on the choice list.
Specifies whether the test set is enabled (active).
The ID of the folder to which the test set belongs.
Specifies the test set priority. Possible values are based on the choice list.
The test set description. Can include an HTML markup.
The ID of the user who owns the test set.
The name of the user, to whom the test set is assigned, in the Last name, First name format.
The ID of the user to whom the test set is assigned. 0 if the test is not assigned to anyone.
The title (name) of the test set.
The test set’s average run time, in seconds.
The name of the folder to which the test set belongs.
The name of the user who run the test set last, in the Last name, First name format.
The ID of the user, who ran the test set last.
The date when the test set ran last.
The number of notes attached to the test set.
The number of tests the test set has.
The number of times the test set ran.
The name of the user, who owns the test set, in the Last name, First name format.
The name of the last user, who updated the test set, in the Last name, First name format.
The status of the test set. Possible values are based on the choice list.
The test set’s average run time, in the hh:mm:ss format.
Specifies whether the tests in the test set will run in sequence.
The ID of the last release for which the test set ran.
The name of the last release for which the test set ran.
The ID of the configuration for which the test set ran.
The name of the configuration for which the test set ran.
The number of schedules attached to the test set.
The status of the last test set run.
Specifies whether the test set can run.
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.
If the test set with the specified ID does not exist, the operation returns the Entity TestSet with Id Test_Set_ID was not found
error.