API - Test run case uploads

Note: All image urls which the API generates are time sensitive and are only valid for a short period of time.

Show

Description: Get the details for a test run case upload.

Endpoint: <base_url>/projects/{project_id}/runs/{run_id}/executed_steps/{executed_step_id}/executed_step_uploads/{id}.json

Request: GET

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • run_id - {Integer} The associated run ID (Required)
  • executed_step_id - {Integer} The test run case ID (Required)
  • id - {Integer} The test run case upload ID (Required)

Response

{ 
....
}

Example ruby request

HTTParty.get('https://api.testlodge.com/v1/account/1/projects/1/runs/1/executed_steps/1/executed_step_uploads/1.json')

Example Response

Response code: 200

{ 
"id":1,
"file_name":"image.jpg",
"content_type": "image/jpeg",
"paths": {
"original": {
"name":"original",
"geometry": null,
"url":"http://s3.amazonaws.com/path/to/image"
},
"thumbnail": {
"name":"thumbnail",
"geometry":"100x100#",
"url":"http://s3.amazonaws.com/path/to/image"
},
"medium": {
"name":"thumbnail",
"geometry":"525x390>",
"url":"http://s3.amazonaws.com/path/to/image"
}
}
}

 

Create

Description: Create a new test run case upload and attach to associated test run case.

Endpoint: <base_url>/projects/{project_id}/runs/{run_id}/executed_steps/{executed_step_id}/executed_step_uploads.json

Request: POST (Must be a multipart request)

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • run_id - {Integer} The associated run ID (Required)
  • executed_step_id - {Integer} The test run case ID (Required)
  • id - {Integer} The test run case upload ID (Required)
  • executed_step_upload
    • file_url - {String} The URL to the image file that you would like to upload (Required)

Response

{ 
....
}

Example ruby request

HTTParty.post('https://api.testlodge.com/v1/account/1/projects/1/runs/1/executed_steps/1/executed_step_uploads.json', body: {
executed_step_upload: {
file_url: 'https://www.testlodge.com/testlodge_logo.png'
}
})

Example Response

Response code: 201

{ 
"id":1,
"file_name":"testlodge_logo",
"content_type": "png",
"paths": {
"original": {
"name":"original",
"geometry": null,
"url":"http://s3.amazonaws.com/path/to/image"
},
"thumbnail": {
"name":"thumbnail",
"geometry":"100x100#",
"url":"http://s3.amazonaws.com/path/to/image"
},
"medium": {
"name":"thumbnail",
"geometry":"525x390>",
"url":"http://s3.amazonaws.com/path/to/image"
}
}
}

 

Delete

Description: Delete a test run case upload.

Endpoint: <base_url>/projects/{project_id}/runs/{run_id}/executed_steps/{executed_step_id}/executed_step_uploads/{id}.json

Request: DELETE

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • run_id - {Integer} The associated run ID (Required)
  • executed_step_id - {Integer} The test run case ID (Required)
  • id - {Integer} The test run case upload ID (Required)

Response

empty

Example ruby request

HTTParty.delete('https://api.testlodge.com/v1/account/1/projects/1/runs/1/executed_steps/1/executed_step_uploads/1.json')

Example Response

Response code: 204

empty

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.