Execution Steps

This chapter focuses on services for the execution steps.

get Get execution step

A GET to /execution-steps/{id} returns the execution step with the given id.

Path parameters

Table 1. /api/rest/latest/execution-steps/{id}
Parameter Description

id

the id of the execution step

HTTP request

GET /api/rest/latest/execution-steps/6 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
Content-Length: 1536

{
  "_type" : "execution-step",
  "id" : 6,
  "execution_status" : "BLOCKED",
  "action" : "<p>Click the button</p>",
  "expected_result" : "<p>The page shows up</p>",
  "comment" : "<p>This is quite simple.</p>",
  "last_executed_by" : "User-J9",
  "last_executed_on" : "2015-04-26T10:00:00.000+00:00",
  "execution_step_order" : 1,
  "referenced_test_step" : {
    "_type" : "action-step",
    "id" : 2,
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-steps/2"
      }
    }
  },
  "execution" : {
    "_type" : "execution",
    "id" : 3,
    "execution_status" : "BLOCKED",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/executions/3"
      }
    }
  },
  "custom_fields" : [ {
    "code" : "CUF_TAG",
    "label" : "Tag Cuf",
    "value" : [ "tag_1", "tag_2", "tag_3" ]
  } ],
  "test_step_custom_fields" : [ {
    "code" : "CUF_TXT",
    "label" : "Basic Text Cuf",
    "value" : "The Value"
  } ],
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/execution-steps/6"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/10"
    },
    "execution" : {
      "href" : "http://localhost:8080/api/rest/latest/executions/3"
    },
    "attachments" : {
      "href" : "http://localhost:8080/api/rest/latest/execution-steps/6/attachments"
    },
    "issues" : {
      "href" : "http://localhost:8080/api/rest/latest/execution-steps/6/issues"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the execution step

execution_status

String

the status of this execution step

action

String

the action to be accomplished, format is html

expected_result

String

the state or behavior that should be observable when the action has been performed, format is html)

comment

String

the comment left after executing the step

last_executed_by

String

the date this execution step was last executed

last_executed_on

String

the user who last executed this execution

execution_step_order

Number

the order of the step in the execution

referenced_test_step

Object

the test step referenced by this execution step

execution

Object

the execution this step belongs to

custom_fields

Array

the custom fields of this execution step

test_step_custom_fields

Array

the denormalized custom fields of the referenced test step

attachments

Array

the attachments of the this step

_links

Object

related links

Relation Description

self

link to this execution step

project

link to the project of this execution step

execution

link to the execution of this execution step

attachments

link to the attachments of this execution step

issues

link to the issues of this execution step

patch Modify status of execution step

A PATCH to /execution-steps/{id}/execution-status/{status} modifies the execution status of the execution step with the given id to the given status.

Path parameters

Table 1. /api/rest/latest/execution-steps/{id}/execution-status/{status}
Parameter Description

id

the id of the execution step

status

the new status of that execution step (success, blocked, ready, running, error, failure, not-found, not-run, settled, untestable or warning)

HTTP request

PATCH /api/rest/latest/execution-steps/6/execution-status/Success HTTP/1.1
Accept: application/json
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1318

{
  "_type" : "execution-step",
  "id" : 6,
  "execution_status" : "SUCCESS",
  "action" : "<p>Click the button</p>",
  "expected_result" : "<p>The page shows up</p>",
  "comment" : "<p>This is quite simple.</p>",
  "last_executed_by" : "User-J9",
  "last_executed_on" : "2015-04-26T10:00:00.000+00:00",
  "execution_step_order" : 1,
  "referenced_test_step" : {
    "_type" : "action-step",
    "id" : 2,
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-steps/2"
      }
    }
  },
  "execution" : {
    "_type" : "execution",
    "id" : 3,
    "execution_status" : "BLOCKED",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/executions/3"
      }
    }
  },
  "custom_fields" : [ {
    "code" : "CUF_TAG",
    "label" : "Tag Cuf",
    "value" : [ "tag_1", "tag_2", "tag_3" ]
  } ],
  "test_step_custom_fields" : [ {
    "code" : "CUF_TXT",
    "label" : "Basic Text Cuf",
    "value" : "The Value"
  } ],
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/execution-steps/6"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/10"
    },
    "execution" : {
      "href" : "http://localhost:8080/api/rest/latest/executions/3"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

id

Number

the id of the execution step

execution_status

String

the status of this execution step

action

String

the action to be accomplished, format is html

expected_result

String

the state or behavior that should be observable when the action has been performed, format is html)

comment

String

the comment left after executing the step

last_executed_by

String

the date this execution step was last executed

last_executed_on

String

the user who last executed this execution

execution_step_order

Number

the order of the step in the execution

referenced_test_step

Object

the test step referenced by this execution step

execution

Object

the execution this step belongs to

custom_fields

Array

the custom fields of this execution step

test_step_custom_fields

Array

the denormalized custom fields of the referenced test step

attachments

Array

the attachments of the test step

_links

Object

related links

Relation Description

self

link to this execution step

project

link to the project of this execution step

execution

link to the execution of this execution step

patch Modify an execution step

A PATCH to /execution-steps/{id} modifies the execution step with the given id.

Path parameters

Table 1. /api/rest/latest/execution-steps/{id}
Parameter Description

id

the id of the execution step

HTTP request

PATCH /api/rest/latest/execution-steps/6 HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 180
Host: localhost:8080

{
  "_type" : "execution-step",
  "comment" : "<p>Updated comment.</p>",
  "custom_fields" : [ {
    "code" : "TXT_STATUS",
    "value" : "Updated execution step CUF value"
  } ]
}

Request fields

Path Type Description

_type

String

the type of the entity (mandatory)

comment

String

the new comment of the execution step

custom_fields

Array

an array of custom fields

custom_fields[].code

String

the code of the custom field to modify

custom_fields[].value

Varies

the value of the custom field. It should match the type of the field (text, date etc). If the field accepts only a single value the content is a string, if it accepts multiple values (eg, tags) the content is an array of strings.

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1377

{
  "_type" : "execution-step",
  "id" : 6,
  "execution_status" : "SUCCESS",
  "action" : "<p>Click the button</p>",
  "expected_result" : "<p>The page shows up</p>",
  "comment" : "<p>Updated comment.</p>",
  "last_executed_by" : "User-J9",
  "last_executed_on" : "2015-04-26T10:00:00.000+00:00",
  "execution_step_order" : 1,
  "referenced_test_step" : null,
  "execution" : {
    "_type" : "execution",
    "id" : 3,
    "execution_status" : "BLOCKED",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/executions/3"
      }
    }
  },
  "custom_fields" : [ {
    "code" : "TXT_STATUS",
    "label" : "text",
    "value" : "Updated execution step CUF value"
  }, {
    "code" : "TAGS_RELATED",
    "label" : "see also",
    "value" : [ "see this", "also that" ]
  } ],
  "test_step_custom_fields" : [ {
    "code" : "TC_TEXT",
    "label" : "test case cuf",
    "value" : "Updated test case step value"
  }, {
    "code" : "TC_LABELS",
    "label" : "labels",
    "value" : [ "was", "not", "updated" ]
  } ],
  "attachments" : [ ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/execution-steps/6"
    },
    "project" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/10"
    },
    "execution" : {
      "href" : "http://localhost:8080/api/rest/latest/executions/3"
    }
  }
}

get Get issues of execution step

A GET to /execution-steps/{id}/issues returns all the issues of the execution step with the given id.

Path parameters

Table 1. /api/rest/latest/execution-steps/{id}/issues
Parameter Description

id

the id of the execution-step

HTTP request

GET /api/rest/latest/execution-steps/22/issues 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)

fields

which fields of the elements should be returned (optional)

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 384

{
  "_embedded" : {
    "issues" : [ {
      "remoteIssueId" : "165",
      "url" : "http://192.175.1.51/bugzilla/show_bug.cgi?id=165"
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/execution-steps/22/issues?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.issues

Array

the issues of this execution-step

_embedded.issues[].remoteIssueId

String

the remote issue id of the issue linked to the execution-step.

_embedded.issues[].url

String

the url of the issue linked to the execution-step.

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the user 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)