Execution Steps

This chapter focuses on services for the execution steps.

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;charset=UTF-8
Content-Length: 1431

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

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

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;charset=UTF-8
Content-Length: 1317

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

Modify comment of execution step

A PATCH to /execution-steps/{id} modifies the comment of 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
Accept: application/json
Content-Length: 72
Content-Type: application/json
Host: localhost:8080

{
  "_type" : "execution-step",
  "comment" : "<p>Update comment.</p>"
}

HTTP response

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

{
  "_type" : "execution-step",
  "id" : 6,
  "execution_status" : "SUCCESS",
  "action" : "<p>Click the button</p>",
  "expected_result" : "<p>The page shows up</p>",
  "comment" : "<p>Update comment.</p>",
  "last_executed_by" : "User-J9",
  "last_executed_on" : "2015-04-26T10:00:00.000+0000",
  "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" : [ ],
  "test_step_custom_fields" : [ ],
  "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"
    }
  }
}