Test Suites
This chapter focuses on services for the test suites.
Get test suite
A GET
to /test-suites/{id}
returns the test suite with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test suite |
HTTP request
GET /api/rest/latest/test-suites/9 HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2662
{
"_type" : "test-suite",
"id" : 9,
"name" : "sample test suite",
"description" : "<p>this is a sample test suite</p>",
"parent" : {
"_type" : "iteration",
"id" : 101,
"name" : "second iteration",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
}
}
},
"created_by" : "admin",
"created_on" : "2017-07-12T10:00:00Z",
"last_modified_by" : "admin",
"last_modified_on" : "2017-07-12T10:00:00Z",
"custom_fields" : [ {
"code" : "CF_TXT",
"label" : "cuf text",
"value" : "the_value"
}, {
"code" : "CF_TAG",
"label" : "cuf tag",
"value" : [ "tag_1", "tag_2" ]
} ],
"test_plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 80,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 90,
"name" : "first test case",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/90"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 5,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/5"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/80"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 41,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 91,
"name" : "test case 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/91"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 9,
"name" : "dataset",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/9"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/41"
}
}
} ],
"attachments" : [ ],
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/15"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/101"
},
"test-plan" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/test-plan"
},
"attachments" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/9/attachments"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the id of the test suite |
|
|
the type of the entity |
|
|
the name of the test suite |
|
|
the description of the test suite |
|
|
the parent entity of the test suite |
|
|
the user who created the test suite |
|
|
the date the test suite was created |
|
|
the user who last modified the test suite |
|
|
the date the test suite was last modified |
|
|
the custom fields of the test suite |
|
|
the iteration test plan items of the test suite |
|
|
the attachments of the test suite |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this test suite |
|
link to the project the test suite belongs to |
|
link to the iteration the test suite belongs to |
|
link the test plan of the test suite |
|
link the test plan of the test suite |
Get plans of test suite
A GET
to /test-suites/{id}/test-plan
returns all the test plans of the test suite with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the test suite |
HTTP request
GET /api/rest/latest/test-suites/44/test-plan HTTP/1.1
Accept: application/json
Host: localhost:8080
Request parameters
Parameter | Description |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 4396
{
"_embedded" : {
"test-plan" : [ {
"_type" : "iteration-test-plan-item",
"id" : 1,
"execution_status" : "BLOCKED",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 1,
"name" : "sample test case 1",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/1"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 1,
"name" : "sample dataset 1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/1"
}
}
},
"last_executed_by" : "User-1",
"last_executed_on" : "2017-07-13T10:00:00Z",
"assigned_to" : "User-1",
"executions" : [ {
"_type" : "execution",
"id" : 11,
"execution_status" : "FAILURE",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-07-13T10:00:00Z",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/11"
}
}
}, {
"_type" : "execution",
"id" : 21,
"execution_status" : "BLOCKED",
"last_executed_by" : "User-1",
"last_executed_on" : "2017-07-13T10:00:00Z",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/21"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 1,
"name" : "sample iteration 1",
"reference" : "IT1",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1"
}
}
}, {
"_type" : "iteration-test-plan-item",
"id" : 2,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 2,
"name" : "sample test case 2",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/2"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 2,
"name" : "sample dataset 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
}
}
},
"last_executed_by" : "User-2",
"last_executed_on" : "2017-07-15T10:00:00Z",
"assigned_to" : "User-2",
"executions" : [ {
"_type" : "execution",
"id" : 12,
"execution_status" : "SUCCESS",
"last_executed_by" : "User-2",
"last_executed_on" : "2017-07-07T10:00:00Z",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/12"
}
}
}, {
"_type" : "execution",
"id" : 22,
"execution_status" : "BLOCKED",
"last_executed_by" : "User-2",
"last_executed_on" : "2017-07-15T10:00:00Z",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/22"
}
}
}, {
"_type" : "execution",
"id" : 32,
"execution_status" : "RUNNING",
"last_executed_by" : "User-2",
"last_executed_on" : "2017-07-20T10:00:00Z",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/32"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 2,
"name" : "sample iteration 2",
"reference" : "IT2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/2"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/2"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-suites/44/test-plan"
}
},
"page" : {
"size" : 20,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the iteration test plan items of this test suite |
|
|
the page size for that query |
|
|
total number of elements the client is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
link to the last page (optional) |