POST/projects/{ProjectId}/testruns/{Id}/restart

Applies to QAComplete 14.3, last modified on February 19, 2024

Restarts a test run.

Use the operation to restart a QAComplete test run.

Keep in mind that this operation actually creates a new QAComplete test run with an individual ID rather than applies some changes to the existing test run.

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 the Test Library.

Request Format

To restart a test run, send a POST request to the following URL:

http://{server}/rest-api/service/api/v2/projects/{ProjectId}/testruns/{Id}/restart
URL parameters

ProjectId  :  integer, required

The ID of the project, to which the test run belongs.

Id  :  integer, required

The ID of the test run, which you need to restart.

Body parameters

In the request body, pass the empty RequestTestRunRestartPost JSON object.

A sample request:

POST http://yourserver.com/rest-api/service/api/v2/projects/11946/testruns/2316/restart HTTP/1.1
Host: yourserver.com
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Length: 0

A sample request made by using cURL:

curl -i [email protected]:p@ssword -H "Accept: application/json" http://yourserver.com/rest-api/service/api/v2/projects/119446/testruns/2316/restart

Response Format

If it is successful, the operation responds with HTTP status code 200. The response is a JSON object with information on the new test run, based on the test run you have restarted:

A sample response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 592



{
  "id": 831233,
  "release_id": 0,
  "project_id": 98429,
  "run_by_user_id": 130457,
  "run_by_user_name": "Smith, John ",
  "is_sequential": false,
  "status_code": "Awaiting Run",
  "execution_type": "Automated",
  "date_started": "2016-09-23T06:42:04.6530000",
  "date_finished": "2016-09-23T06:42:16.7700000",
  "nbr_tests": 1,
  "nbr_passed": 0,
  "nbr_failed": 0,
  "nbr_blocked": 0,
  "nbr_awaiting_run": 1,
  "run_time": 0,
  "run_time_formated": "00:00:00",
  "schedule_id": "0",
  "test_host": "TESTHOST"
}

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 item with the specified ItemId or Id does not exist, the operation returns the File or directory not found error.

See Also

Test Runs Resources

Highlight search results