Test Steps

This chapter focuses on services for the test steps.

Get a test step

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

Path parameters

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

id

the id of the step (optional)

HTTP request

GET /api/rest/latest/test-steps/235 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: 727

{
  "_type" : "action-step",
  "id" : 235,
  "test_case" : {
    "_type" : "test-case",
    "id" : 120,
    "name" : "Door opening system",
    "_links" : {
      "self" : {
        "href" : "http://localhost:8080/api/rest/latest/test-cases/120"
      }
    }
  },
  "action" : "<p>Wave your hand</p>",
  "expected_result" : "<p>The door opens</p>",
  "custom_fields" : [ {
    "code" : "cuf_txt_note",
    "label" : "note",
    "value" : "Star Trek style welcomed but not mandatory"
  }, {
    "code" : "cuf_tags_see_also",
    "label" : "see also",
    "value" : [ "smart home", "sensors", "hand gesture" ]
  } ],
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/test-steps/235"
    }
  }
}

Response fields

Path Type Description

id

Number

the id of the step

_type

String

the type of 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)

test_case

Object

the test case this step is part of

custom_fields

Array

the custom fields of that test step

custom_fields[].label

String

the label of the custom field

custom_fields[].code

String

the code of the custom field

custom_fields[].value

Varies

the value of the custom field. The value is either a string (for most custom fields), or an array of strings (for multivalued custom fields eg a tag list)

_links

Object

related links

Relation Description

self

link to this step