Zum Hauptinhalt springen

Test Case

TMT API (1.0.0)

Download OpenAPI specification:Download

API working with Test cases in TMT

Get test case detail

Get content of a test case by given test case document reference

Authorizations:
bearerAuth
header Parameters
Project-Id
required
string

Project Id or the project document reference

Subproject-Id
string

Sub Project Id or the project document reference. It might be required if you want to access the sub project's resource

Request Body schema: application/json
required
id
required
string

id of the operation

jsonrpc
required
string

must be 2.0

method
required
string

GET_DOCUMENT

required
object

Responses

Request samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "method": "GET_DOCUMENT",
  • "id": "GET_DOCUMENT-30",
  • "params": {
    }
}

Response samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": "GET_DOCUMENT-30",
  • "result": {
    }
}

List test cases

  • List test case documents for given search criteria
  • Notice: LIST_DOCUMENTS operation provides the flexibility to the caller, so they can customize their search criteria. But it requires the basic understanding on the search object to get the proper result. For the test cases, it is worthy to put the attention on the filter LIST_DOCUMENTS "-Root.Metadata.IsFrozenByClosedTestRun:true" to filter out the test cases are frozen by a closed run.
Authorizations:
bearerAuth
header Parameters
Project-Id
required
string

Project Id or the project document reference

Subproject-Id
string

Sub Project Id or the project document reference. It might be required if you want to access the sub project's resource

Request Body schema: application/json
required
id
required
string

id of the operation

jsonrpc
required
string

must be 2.0

method
required
string

LIST_DOCUMENT

required
object

Responses

Request samples

Content type
application/json
{
  • "id": "TestCases.DataProvider-98",
  • "jsonrpc": "2.0",
  • "method": "LIST_DOCUMENTS",
  • "params": {
    }
}

Response samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": "TestCases.DataProvider-98",
  • "result": {
    }
}

Create a new test case

Create a new test case and add it into a test case tree.
The new test case will be located at the end of the folder (or the test suite if it is at the root level)

Authorizations:
bearerAuth
header Parameters
Project-Id
required
string

Project Id or the project document reference

Subproject-Id
string

Sub Project Id or the project document reference. It might be required if you want to access the sub project's resource

Request Body schema: application/json
required
id
required
string

id of the operation

jsonrpc
required
string

must be 2.0

method
required
string

CREATE_TEST_CASE_TREE_NODE

required
object

Responses

Request samples

Content type
application/json
{
  • "id": "addTestCase_12260ae6-5b82-4892-ab8e-0bbaeb38ef83",
  • "method": "CREATE_TEST_CASE_TREE_NODE",
  • "jsonrpc": "2.0",
  • "params": {
    }
}

Response samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": "addTestCase_12260ae6-5b82-4892-ab8e-0bbaeb38ef83",
  • "result": {
    }
}

Update test case

Update test case content

Authorizations:
bearerAuth
header Parameters
Project-Id
required
string

Project Id or the project document reference

Subproject-Id
string

Sub Project Id or the project document reference. It might be required if you want to access the sub project's resource

Request Body schema: application/json
required
id
required
string

id of the operation

jsonrpc
required
string

must be 2.0

method
required
string

MODIFY_DOCUMENT

required
object

Responses

Request samples

Content type
application/json
{
  • "id": "modifyTestCase_0fba4ab2-3443-47fe-b528-417dd8aa71f6",
  • "method": "UPDATE_TEST_CASE_TREE_NODE",
  • "jsonrpc": "2.0",
  • "params": {
    }
}

Response samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": "modifyTestCase_0fba4ab2-3443-47fe-b528-417dd8aa71f6",
  • "result": {
    }
}

Delete a test case

Delete a test case. This test case must be not in any open test run.

Authorizations:
bearerAuth
header Parameters
Project-Id
required
string

Project Id or the project document reference

Subproject-Id
string

Sub Project Id or the project document reference. It might be required if you want to access the sub project's resource

Request Body schema: application/json
required
id
required
string

id of the operation

jsonrpc
required
string

must be 2.0

method
required
string

DELETE_DOCUMENT

required
object

Responses

Request samples

Content type
application/json
{
  • "id": "DeleteNodeIdTestCasedm8ad7ac21c69049759b671e5fc4ec4dce",
  • "params": {
    },
  • "method": "DELETE_DOCUMENT",
  • "jsonrpc": "2.0"
}

Response samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": "DeleteNodeIdTestCasedm8ad7ac21c69049759b671e5fc4ec4dce",
  • "result": null
}

Move test case

Move a test case to another test suite or test folder.

Authorizations:
bearerAuth
header Parameters
Project-Id
required
string

Project Id or the project document reference

Subproject-Id
string

Sub Project Id or the project document reference. It might be required if you want to access the sub project's resource

Request Body schema: application/json
required
id
required
string

id of the operation

jsonrpc
required
string

must be 2.0

method
string

MOVE_TEST_CASE

required
object

Responses

Request samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": "MOVE_TEST_CASE_dacb75d8-24fd-4d17-bb62-5f9b27bba552",
  • "method": "MOVE_TEST_CASE",
  • "params": {
    }
}

Response samples

Content type
application/json
{
  • "jsonrpc": "2.0",
  • "id": "MOVE_TEST_CASE_dacb75d8-24fd-4d17-bb62-5f9b27bba552",
  • "result": {
    }
}