Iteration Test Plan Items

This chapter focuses on services for iteration test plan items.

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

Table 1. /api/rest/latest/iteration-test-plan-items/{id}
Parameter Description

id

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

fields

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: 1833

{
  "_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+0000",
  "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+0000",
    "_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/4/executions"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of this entity

id

Number

the id of this iteration test plan item

execution_status

String

the execution status of this item

referenced_test_case

Object

the corresponding test case of this item

referenced_dataset

Object

the referenced dataset of this item

last_executed_by

String

the login of the user who last executed this item

last_executed_on

String

the date this item was last executed

assigned_to

String

the login of the user this item is assigned to

executions

Array

all the executions of this item

iteration

Object

the iteration this item belongs to

_links

Object

related links

Relation Description

self

link to this iteration test plan item

project

link to the project this item belongs to

test-case

link to the test case corresponding to this item

dataset

link to the dataset used in this item

iteration

link to the iteration this item belongs to

executions

link to the executions of this item

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

Table 1. /api/rest/latest/iteration-test-plan-items/{id}/executions
Parameter Description

id

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

page

number of the page to retrieve (optional)

size

size of the page to retrieve (optional)

sort

which attributes of the returned entities should be sorted on (optional)

fields

which fields of the elements should be returned (optional)

include

level of depth of the content that should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1834

{
  "_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+0000",
      "_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+0000",
      "_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+0000",
      "_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

_embedded.executions

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the client is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

Create execution for iteration test plan item

A POST to /iteration-test-plan-items/{id}/executions creates a new execution for the iteration test plan item with the given id.

Path parameters

Table 1. /api/rest/latest/iteration-test-plan-items/{id}/executions
Parameter Description

id

the id of the test plan element

HTTP request

POST /api/rest/latest/iteration-test-plan-items/265/executions HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Request parameters

Parameter Description

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 2247

{
  "_type" : "execution",
  "id" : 25,
  "name" : "Christmas turkey test flight",
  "execution_order" : 0,
  "execution_status" : "READY",
  "last_executed_by" : null,
  "last_executed_on" : null,
  "execution_mode" : "MANUAL",
  "reference" : "CHR-T024",
  "dataset_label" : "",
  "execution_steps" : [ {
    "_type" : "execution-step",
    "id" : 50,
    "execution_status" : "READY",
    "action" : "<p>arm the slingshot</p>",
    "expected_result" : "<p>slingshot is armed</p>",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/execution-steps/50"
      }
    }
  }, {
    "_type" : "execution-step",
    "id" : 51,
    "execution_status" : "READY",
    "action" : "<p>install the turkey</p>",
    "expected_result" : "<p>the turkey groans and is in place</p>",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/execution-steps/51"
      }
    }
  }, {
    "_type" : "execution-step",
    "id" : 52,
    "execution_status" : "READY",
    "action" : "<p>release the slingshot</p>",
    "expected_result" : "<p>the turkey groans, at a distance though</p>",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/execution-steps/52"
      }
    }
  } ],
  "comment" : null,
  "prerequisite" : "",
  "description" : "<p>Will test the aerodynamic profile of a sample turkey</p>",
  "importance" : "LOW",
  "nature" : {
    "code" : "NAT_PERFORMANCE_TESTING"
  },
  "type" : {
    "code" : "TYP_COMPLIANCE_TESTING"
  },
  "test_case_status" : "WORK_IN_PROGRESS",
  "custom_fields" : [ ],
  "test_case_custom_fields" : [ ],
  "language" : "",
  "script_name" : "",
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/executions/25"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/15"
    },
    "test_plan_item" : {
      "href" : "http://localhost:8080/api/rest/latest/iteration-test-plan-items/1"
    },
    "execution-steps" : {
      "href" : "http://localhost:8080/api/rest/latest/executions/25/execution-steps"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/executions/25/attachments"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity, etc

Relation Description

self

the link to this execution

project

the link to the execution project

test_plan_item

the test plan item of this execution

execution-steps

the link to the execution steps

attachments

the attachments to the test plan element