Iteration Test Plan Items
This chapter focuses on services for iteration test plan items. An iteration test plan item represents a test case that has been planned in an iteration test plan. It belongs to an iteration, and binds together the test case to execute with a dataset (optional) and an assigned user (optional).
Get iteration test plan item
A GET
to /iteration-test-plan-items/{id}
returns the iteration test plan item with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration test plan item |
HTTP request
GET /api/rest/latest/iteration-test-plan-items/4 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
Content-Length: 1835
{
"_type" : "iteration-test-plan-item",
"id" : 6,
"execution_status" : "SUCCESS",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 3,
"name" : "Test Case 3",
"reference" : "TC3",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/3"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 2,
"name" : "Dataset 2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
}
}
},
"last_executed_by" : "User 6",
"last_executed_on" : "2017-02-04T11:00:00.000+00:00",
"assigned_to" : "User 6",
"executions" : [ {
"_type" : "execution",
"id" : 10,
"execution_status" : "SUCCESS",
"last_executed_by" : "User 6",
"last_executed_on" : "2017-02-04T11:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/10"
}
}
} ],
"iteration" : {
"_type" : "iteration",
"id" : 1,
"name" : "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/6"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/1"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/3"
},
"dataset" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/2"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/1"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/6/executions"
}
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the type of this entity |
|
|
the id of this iteration test plan item |
|
|
the execution status of this item |
|
|
the corresponding test case of this item |
|
|
the referenced dataset of this item |
|
|
the login of the user who last executed this item |
|
|
the date this item was last executed |
|
|
the login of the user this item is assigned to |
|
|
all the executions of this item |
|
|
the iteration this item belongs to |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this iteration test plan item |
|
link to the project this item belongs to |
|
link to the test case corresponding to this item |
|
link to the dataset used in this item |
|
link to the iteration this item belongs to |
|
link to the executions of this item |
Create iteration test plan item
A POST
to /iterations/{iterationId}/test-plan
creates a new entry in the test plan of the iteration with the given id. The entry must
reference a test case, and optionally for which dataset and which assignee. If specified, the dataset must belong to the referenced Test Case.
The dataset and/or assignee may be undefined or null if you don’t want to set them yet.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration |
HTTP request
POST /api/rest/latest/iterations/4/test-plan HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 193
Host: localhost:8080
{
"_type" : "iteration-test-plan-item",
"test_case" : {
"_type" : "test-case",
"id" : 25
},
"dataset" : {
"_type" : "dataset",
"id" : 3
},
"assigned_to" : "User-1"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the test case to include in the test plan (as described below) |
|
|
the type of the entity (always 'test-case') |
|
|
the id of the test case |
|
|
the dataset to be used when the test case will be executed (optional) |
|
|
the type of the entity (always 'dataset') |
|
|
the id of the dataset. Remember that the dataset must belong to the planned test case. |
|
|
the username of the user assigned to this test case (optional) |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 1381
{
"_type" : "iteration-test-plan-item",
"id" : 38,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 25,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/25"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 3,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
}
}
},
"last_executed_by" : null,
"last_executed_on" : null,
"assigned_to" : "User-1",
"executions" : [ ],
"iteration" : {
"_type" : "iteration",
"id" : 4,
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/4"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/38"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/25"
},
"dataset" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/4"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/38/executions"
}
}
}
Modify iteration test plan item
A Patch
to /iteration-test-plan-items/{id}
modifies the iteration test plan item with the given id. You can modify the planned dataset, the assignee, or both. A property left absent from the json payload will not be altered, if present with a null value they will be reset. You cannot change the planned test case.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration test plan item |
HTTP request
PATCH /api/rest/latest/iteration-test-plan-items/50 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 129
Host: localhost:8080
{
"_type" : "iteration-test-plan-item",
"dataset" : {
"_type" : "dataset",
"id" : 3
},
"assigned_to" : "User-1"
}
Request fields
Path | Type | Description |
---|---|---|
|
|
the type of the entity |
|
|
the dataset to use when the test case is executed (optional). You can remove the dataset by setting this to null. |
|
|
the type of the entity ('dataset') |
|
|
the id of this dataset |
|
|
the username of the user assigned to this test (optional). You can assign this test to nobody by setting this to null. |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1497
{
"_type" : "iteration-test-plan-item",
"id" : 50,
"execution_status" : "READY",
"referenced_test_case" : {
"_type" : "test-case",
"id" : 25,
"name" : "AKM-Test case 1",
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/25"
}
}
},
"referenced_dataset" : {
"_type" : "dataset",
"id" : 3,
"name" : "Jeu2",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
}
}
},
"last_executed_by" : null,
"last_executed_on" : null,
"assigned_to" : "User-1",
"executions" : [ ],
"iteration" : {
"_type" : "iteration",
"id" : 4,
"name" : null,
"reference" : "",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/4"
}
}
},
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/50"
},
"project" : {
"href" : "http://localhost:8080/api/rest/latest/projects/14"
},
"test-case" : {
"href" : "http://localhost:8080/api/rest/latest/test-cases/25"
},
"dataset" : {
"href" : "http://localhost:8080/api/rest/latest/datasets/3"
},
"iteration" : {
"href" : "http://localhost:8080/api/rest/latest/iterations/4"
},
"executions" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/50/executions"
}
}
}
Delete iteration test plan item
A DELETE
to /iteration-test-plan-items/{testPlanItemsIds}
deletes one or several iteration test plan items with the given id(s).
Path parameters
Parameter | Description |
---|---|
|
the list of ids of the iteration test plan items |
HTTP request
DELETE /api/rest/latest/iteration-test-plan-items/45,46 HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Get executions of iteration test plan item
A GET
to /iteration-test-plan-items/{id}/executions
returns all the executions of the iteration test plan item with the given id.
Path parameters
Parameter | Description |
---|---|
|
the id of the iteration-test-plan-item |
HTTP request
GET /api/rest/latest/iteration-test-plan-items/1/executions?size=3&page=1 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 attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1837
{
"_embedded" : {
"executions" : [ {
"_type" : "execution",
"id" : 10,
"name" : "TC1 - Test Case 1",
"execution_order" : 0,
"execution_status" : "FAILURE",
"last_executed_by" : "User 8",
"last_executed_on" : "2017-06-12T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/10"
}
}
}, {
"_type" : "execution",
"id" : 11,
"name" : "TC1 - Test Case 1",
"execution_order" : 1,
"execution_status" : "BLOCKED",
"last_executed_by" : "User 8",
"last_executed_on" : "2017-06-13T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/11"
}
}
}, {
"_type" : "execution",
"id" : 12,
"name" : "TC1 - Test Case 1",
"execution_order" : 2,
"execution_status" : "SUCCESS",
"last_executed_by" : "User 8",
"last_executed_on" : "2017-06-14T10:00:00.000+00:00",
"_links" : {
"self" : {
"href" : "http://localhost:8080/api/rest/latest/executions/12"
}
}
} ]
},
"_links" : {
"first" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1/executions?page=0&size=3"
},
"prev" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1/executions?page=0&size=3"
},
"self" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1/executions?page=1&size=3"
},
"last" : {
"href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1/executions?page=1&size=3"
}
},
"page" : {
"size" : 3,
"totalElements" : 6,
"totalPages" : 2,
"number" : 1
}
}
Response fields
Path | Type | Description |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the user 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) |