Uploads a TestComplete log for the test run.
After running automated tests on a test host, an agent can upload the test logs to QAComplete in the .xml or .tcLogX (TestComplete logs) format. Users can download these logs for local use from the Test Runner screen in the Run History.
Basic authentication using the host ID and security token. See Authentication for details.
To upload an .xml or .tcLogX log for a test run, send a POST request with
Content-Type multipart/form-data to the following URL:
HostId : integer, required
The host ID.
RunId : integer, required
The test run ID. This is the
results[index].id value from the …/currentruns operation response. In QAComplete, test run IDs appear in Test Management > Run History and in the history of Test Schedules.
SequenceNumber : integer, required
For test sets, this is the 1-based index (the sequence number) of the test in the set. For individual tests, use 1.
You can get this value from the response of the …/currentruns operation as
In the request body, pass the needed file contents wrapped as multipart/form-data. Some tools and development libraries let you specify just the file name and construct the request body automatically.
If the specified test run item already has a log, the operation tries to overwrite it.
A sample request:
POST rest-api/service/automation/v2/hosts/143/runs/532/items/1/logs HTTP/1.1
Content-Type: multipart/form-data; boundary=-----------------4cdb82907604a3aa
Authorization: Basic am9obkBleGFtcGxlLmNvbTpwQHNzd29yZA==
Content-Disposition: form-data; name="log"; filename="SampleLog.tcLogX"
A sample request made by using cURL:
curl -v -i -u &id-token; -F log=@SampleLog.tcLogX http://yourserver.com/rest-api/service/automation/v2/hosts/143/runs/532/items/1/logs
On success, the operation returns an empty response with HTTP status code 200.
If the operation fails, it returns the appropriate status code and (optionally) the error description in the response body.
QAComplete has a limit on the size of the uploaded file. Please ask your QAComplete server administrator what this limit is. Make sure you do not hit this limit in your API calls.