Ana içeriğe geç
Versiyon: Next

Test Cases

Test cases live in the Test Management service and are shared by TestPilot and CaseWriter.

Base path: https://api.rabbitqa.com/tmt/company/api/v1/testCases

not

The path segment is camelCase — testCases, not test-cases.

List and retrieve​

curl https://api.rabbitqa.com/tmt/company/api/v1/testCases \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-Id: 91"
MethodPathPurpose
GET/testCasesList test cases in the active workspace
GET/testCases/recentRecently viewed or edited cases
GET/testCases/{testCaseId}Retrieve by numeric id
GET/testCases/{code}Retrieve by human-readable code, for example TC-118
GET/testCases/{testCaseId}/auditsChange history for one case

The code lookup accepts the PREFIX-NUMBER form shown in the interface, which makes it convenient for linking from an external tracker.

Create, update and delete​

MethodPathPurpose
POST/testCasesCreate a test case
PUT/testCases/{testCaseId}Update a test case
DELETE/testCases/{testCaseId}Delete one test case
DELETE/testCasesDelete several by id
POST/testCases/batchCreate several in one call
POST/testCases/changeSetApply a set of changes together

Bulk operations​

MethodPathPurpose
POST/testCases/bulk-moveMove cases between folders or projects
POST/testCases/bulk-delete-stateCheck or apply a bulk delete

Labels​

MethodPathPurpose
POST/testCases/{testCaseId}/labelsAttach labels
DELETE/testCases/{testCaseId}/labelsDetach labels

Labels themselves are managed at /tmt/company/api/v1/labels.

Test sets​

A test set groups cases for execution.

Base path: https://api.rabbitqa.com/tmt/company/api/v1/testSets

MethodPathPurpose
GET/testSetsList test sets
GET/testSets/recentRecently used sets
GET/testSets/{testSetId}Retrieve by id
GET/testSets/{code}Retrieve by code
POST/testSetsCreate
PUT/testSets/{testSetId}Update
DELETE/testSets/{testSetId}Delete one
DELETE/testSetsDelete several
POST/testSets/moveMove within the tree

Supporting lookups​

These return the values accepted by the case fields:

  • /tmt/company/api/v1/testStatus
  • /tmt/company/api/v1/testPriorities
  • /tmt/company/api/v1/testComplexities
  • /tmt/company/api/v1/labels

Structure and import​

  • /tmt/company/api/v1/testTrees — folder structure, with move, duplicate, undo and redo run as asynchronous sessions
  • /tmt/company/api/v1/testRepository — Excel and TestRail import and export, also asynchronous

See also​

  • Test Runs — executing cases and recording results
  • Projects — grouping cases into a project