API - Test suites

List

Description: Provides a paginated list of all test suites within a given project.

Endpoint: <base_url>/v1/projects/{project_id}/suites.json

Request: GET

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • page - {Integer} of the page (Default: 1)
  • order - {Integer} of how to order the list (Default: 0)
    • Options:
      • 0 - Created at
      • 1 - Updated at
      • 2 - Name

Response

{
  "pagination": { .... },
  "suites": [
    { .... },
    { .... }
  ]
}

Example ruby request

HTTParty.get('https://example.api.testlodge.com/v1/projects/1/suites.json', query: { order: 2 })

Example Response

Response code: 200

{
  "pagination": {
    "total_entries":2,
    "total_pages":1,
    "current_page":1,
    "next_page":null,
    "previous_page":null,
    "per_page":20
  },
  "suites":[{
    "id":1,
    "name":"Suite name",
"plan_id":null,
"project_id":1,
    "created_at":"2014-02-26T14:33:58Z",
    "updated_at":"2014-02-26T14:33:58Z"
  },
  { .... }]
}

 

Show

Description: Get the details for a test suite.

Endpoint: <base_url>/v1/projects/{project_id}/suites/{id}.json

Request: GET

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • id - {Integer} The test suite ID (Required)

Response

{ .... }

Example ruby request

HTTParty.get('https://example.api.testlodge.com/v1/projects/1/suites/1.json')

Example Response

Response code: 200

{
"id":1,
  "name":"Suite name",
"plan_id":null
"project_id":1,
  "created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Create

Description: Create a new test suite.

Endpoint: <base_url>/v1/projects/{project_id}/suites.json

Request: POST

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • suite:
    • name - {String} The test suite name (Required)
    • plan_id - {Integer} The test plan that you would like associated with this suite

Response

{ .... }

Example ruby request

HTTParty.post('https://example.api.testlodge.com/v1/projects/1/suites.json', body: { 
suite: {
  name: 'Example suite',
plan_id: 1
  }
})

Example Response

Response code: 201

{
"id":1,
  "name":"Example suite",
"plan_id":1
"project_id":1,
  "created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Update

Description: Update a new test suite.

Endpoint: <base_url>/v1/projects/{project_id}/suites/{id}.json

Request: PATCH

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • id - {Integer} The test suite ID (Required)
  • suite:
    • name - {String} The test suite name
    • plan_id - {Integer} The test plan that you would like associated with this suite

Response

{ .... }

Example ruby request

HTTParty.patch('https://example.api.testlodge.com/v1/projects/1/suites/1.json', body: { 
suite: {
  name: 'New name'
  }
})

Example Response

Response code: 200

{
"id":1,
  "name":"New name",
"plan_id":1
"project_id":1,
  "created_at":"2014-02-26T14:33:58Z",
  "updated_at":"2014-02-26T14:33:58Z"
}

 

Delete

Description: Delete a test suite.

Endpoint: <base_url>/v1/projects/{project_id}/suites/{id}.json

Request: DELETE

Formats supported: JSON

Params:

  • project_id - {Integer} The associated project ID (Required)
  • id - {Integer} The test suite ID (Required)

Response

{ }

Example ruby request

HTTParty.delete('https://example.api.testlodge.com/v1/projects/1/suites/1.json')

Example Response

Response code: 204

{ }
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.