Skip to main content

Runs

Create a new run, list run test cases, and create a result status for a test case in a run.

Get test cases in a run with GET

GET/api/public/v0/project/{project_code}/run/{run_id}/tcase

Get a list of all test cases that belong to a run.

Query Params

  • include=folder Includes the test case's folder in the response.

Response

Status: 200

{
"type": "object",
"required": ["tcases"],
"properties": {
"tcases": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "version", "folderId", "pos", "seq", "title", "priority", "status"],
"properties": {
"id": {
"type": "string",
"format": "uuid7 with our custom output format",
"description": "The unique identifier for the test case in the project. This is unique across projects."
},
"version": {
"type": "integer",
"description": "We create a new version for most updates to the test case"
},
"folderId": {
"type": "integer",
"description": "The folder id of folder which the test case belongs to"
},
"pos": {
"type": "integer",
"description": "The position of the test case relative to the other test cases in the folder"
},
"seq": {
"type": "integer",
"description": "Unique identifier for the test case within the project. This is not unique across projects."
},
"title": {
"type": "string",
"description": "The title of the test case"
},
"priority": {
"type": "string",
"description": "The priority of the test case",
"enum": ["low", "medium", "high"],
"default": "medium"
},
"status": {
"type": "string",
"description": "The status of the test case",
"enum": ["open", "passed", "failed", "blocked", "skipped"],
"default": "open"
},
"folder": {
"type": "object",
"description": "The folder of the test case. Only present if ?include=folder is present in query params.",
"required": ["id", "title", "parentId", "projectId", "pos"],
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier of the folder."
},
"parentId": {
"type": "integer",
"description": "The id of the folder where this folder belongs to. If the folder has no parent, the value is 0"
},
"title": {
"type": "integer",
"description": "The title of the folder."
},
"pos": {
"type": "integer",
"description": "The ordering position of the folder."
},
"projectId": {
"type": "integer",
"description": "The unique identifier of the project this folder belongs to."
}
}
}
}
}
}
}
}

Example Response

{
"tcases": [
{
"id": "1C8gGmuWJ_DJ6CxEichG6yA",
"version": 1,
"folderId": 1,
"pos": 0,
"seq": 3,
"title": "Test Case 3",
"priority": "low",
"status": "open",
"folder": {
"id": 1,
"parentId": 0,
"title": "Folder 1",
"projectId": "1CB2rrXve_KAKCtEPHZwzQK",
"pos": 0
}
},
{
"id": "1C8gGmuVJ_kLgYBcY1Qorzt",
"version": 1,
"folderId": 1,
"pos": 1,
"seq": 1,
"title": "Test Case 1",
"priority": "medium",
"status": "passed",
"folder": {
"id": 1,
"parentId": 0,
"title": "Folder 1",
"projectId": "1CB2rrXve_KAKCtEPHZwzQK",
"pos": 0
}
},
{
"id": "1C8gGmuVp_8czyhZGfFETin",
"version": 2,
"folderId": 2,
"pos": 0,
"seq": 2,
"title": "Test Case 2",
"priority": "high",
"status": "failed",
"folder": {
"id": 2,
"parentId": 1,
"title": "SFolder 1",
"projectId": "1CB2rrXve_KAKCtEPHZwzQK",
"pos": 0
}
}
]
}

Create a new run with POST

POST/api/public/v0/project/{project_code}/run

Create a new run.

Each query plan describes the test cases that should be selected by this query plan. We take the union of all the test cases from the query plans belonging to the run to compile the final list of test cases.

Each query plan can have a different set of filters conditions.

To get the tag ids used in query plans, look at the tags documentation.

Request

{
"type": "object",
"required": ["title"],
"properties": {
"title": {
"type": "string",
"description": "The title of the run"
},
"description": {
"type": "string",
"description": "The description of the run"
},
"milestoneId": {
"type": ["integer", null],
"description": "The milestone id of the milestone which the run belongs to"
},
"assignmentId": {
"type": ["integer", null],
"description": "The user id of the user who is assigned to the run"
},
"queryPlans": {
"type": ["array", null],
"items": {
"type": "object",
"required": ["folderIds"],
"properties": {
"folderIds": {
"type": "array",
"items": {
"type": "integer",
"description": "The ids of the folders which the test cases belong to, test cases belonging to the sub-folders are also selected"
}
},
"tagIds": {
"type": "array",
"items": {
"type": "integer",
"description": "The tag id of the tag which the test cases must have"
}
},
"priorities": {
"type": "array",
"items": {
"type": "string",
"description": "The priority that the test cases must have",
"enum": ["low", "medium", "high"]
}
}
}
},
"description": "Query plans describe the test cases that should be part of this run. We take union of all the test cases from all the query plans to get the final list of test cases that become part of the run. Each query plan can have a different set of filters conditions."
},
"type": {
"type": "string",
"description": "The type of the run. Live runs are updated as you update the test cases. Static struct runs keep the same structure but test case contents are updated. Static runs are not updated.",
"enum": ["live", "static_struct", "static"]
}
}
}

Example Request

{
"title": "Run title",
"description": "This is the run description",
"milestoneId": null,
"assignmentId": 1,
"queryPlans": [
{
"folderIds": [1, 2],
"tagIds": [1, 2],
"priorities": ["low", "medium"]
},
{
"folderIds": [3, 4],
"tagIds": [3, 4],
"priorities": ["high"]
}
],
"type": "live"
}

Response

Status: 201

{
"type": "object",
"required": ["id"],
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier for the run in the project. This is unique across projects."
}
}
}

Example Response

{
"id": 2
}

Create a new run by cloning with POST

POST/api/public/v0/project/{project_code}/run/clone

Create a new run by cloning an existing run. Note that since open runs are live updated, the cloned run might have different test cases than the original run depending on the changes made to the folder structure or test cases.

Request

{
"type": "object",
"required": ["title","runId"],
"properties": {
"runId": {
"type": "integer",
"description": "The unique identifier for the run in the project. This is unique across projects."
},
"title": {
"type": "string",
"description": "The title of the run"
},
"description": {
"type": "string",
"description": "The description of the run"
},
"milestoneId": {
"type": ["integer", null],
"description": "The milestone id of the milestone which the run belongs to"
},
"assignmentId": {
"type": ["integer", null],
"description": "The user id of the user who is assigned to the run"
}
}
}

Example Request

{
"runId": 1,
"title": "Run title",
"description": "This is the run description",
"milestoneId": null,
"assignmentId": 1
}

Response

Status: 201

{
"type": "object",
"required": ["id"],
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier for the run in the project. This is unique across projects."
}
}
}

Example Response

{
"id": 2
}

Create a result status with POST

POST/api/public/v0/project/{project_code}/run/{run_id}/tcase/{tcase_id}/result

Create a result status for a test case in a run.

Request

{
"type": "object",
"required": ["status"],
"properties": {
"status": {
"type": "string",
"description": "The status of the test case",
"enum": ["open", "passed", "failed", "blocked", "skipped"]
},
"comment": {
"type": ["string", null],
"description": "Optional comment for the result"
}
}
}

Example Request

{
"status": "passed",
"comment": "This is a comment"
}

Response

Status: 201

{
"type": "object",
"required": ["id"],
"properties": {
"id": {
"type": "integer",
"description": "The unique identifier for the result in the project. This is unique across projects."
}
}
}

Example Response

{
"id": 2
}