Automated Suites

This chapter focuses on services for the automated suites.

Get all automated suites

A GET to /automated-suites returns all the automated suites that the client is allowed to read.

HTTP request

GET /api/rest/latest/automated-suites?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)

type

which type of the test case should be returned (optional)

HTTP response

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

{
  "_embedded" : {
    "automated-suites" : [ {
      "id" : "4028b88161e64f290161e6d832460019",
      "_type" : "automated-suite",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
        },
        "executions" : {
          "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
        }
      }
    }, {
      "id" : "4028b881620b2a4a01620b31f2c60000",
      "_type" : "automated-suite",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b881620b2a4a01620b31f2c60000"
        },
        "executions" : {
          "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b881620b2a4a01620b31f2c60000/executions"
        }
      }
    }, {
      "id" : "4028b88161e64f290161e6704c37000f",
      "_type" : "automated-suite",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6704c37000f"
        },
        "executions" : {
          "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6704c37000f/executions"
        }
      }
    } ]
  },
  "_links" : {
    "first" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites?page=0&size=3"
    },
    "prev" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites?page=0&size=3"
    },
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites?page=1&size=3"
    },
    "last" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites?page=1&size=3"
    }
  },
  "page" : {
    "size" : 3,
    "totalElements" : 6,
    "totalPages" : 2,
    "number" : 1
  }
}

Response fields

Path Type Description

_embedded.automated-suites

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)

Get automated suite

A GET to /automated-suites/{id} returns the automated suite with the given id.

Path parameters

Table 1. /api/rest/latest/automated-suites/{id}
Parameter Description

id

the id of the automated suite

HTTP request

GET /api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019 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-Length: 368
Content-Type: application/json;charset=UTF-8

{
  "id" : "4028b88161e64f290161e6d832460019",
  "_type" : "automated-suite",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
    },
    "executions" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
    }
  }
}

Response fields

Path Type Description

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

link to the associated executions

Get automated execution extenders of automated suite

A GET to /automated-suites/{id}/executions returns all the automated execution extenders related to the automated suite with the given id.

Path parameters

Table 1. /api/rest/latest/automated-suites/{id}/executions
Parameter Description

id

the id of the automated suite

HTTP request

GET /api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions 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)

HTTP response

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

{
  "_embedded" : {
    "automated-execution-extenders" : [ {
      "_type" : "automated-execution-extender",
      "id" : 778,
      "result_url" : "http://1234:4567/jenkins/report",
      "result_summary" : "all right",
      "result_status" : "BLOCKED",
      "execution_node" : "no root",
      "execution" : {
        "_type" : "execution",
        "id" : 56,
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/56"
          }
        }
      },
      "automated_test" : {
        "_type" : "automated-test",
        "id" : 569,
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/automated-tests/569"
          }
        }
      },
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/automated-execution-extenders/778"
        }
      }
    }, {
      "_type" : "automated-execution-extender",
      "id" : 338,
      "result_url" : "http://1234:4567/jenkins/report",
      "result_summary" : "all wrong",
      "result_status" : "BLOCKED",
      "execution_node" : "your are right",
      "execution" : {
        "_type" : "execution",
        "id" : 56,
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/executions/56"
          }
        }
      },
      "automated_test" : {
        "_type" : "automated-test",
        "id" : 569,
        "_links" : {
          "self" : {
            "href" : "http://localhost:8080/api/rest/latest/automated-tests/569"
          }
        }
      },
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/automated-execution-extenders/338"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions?page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 2,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.automated-execution-extenders

Array

the automated execution extenders of this automated suite

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 automated suite from iteration

A POST to /automated-suite-utils/from-iteration creates a new automated suite with the given iteration id in request parameters.

HTTP request

POST /api/rest/latest/automated-suite-utils/from-iteration HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080

iterationId=486

Request parameters

Parameter Description

iterationId

the id of the iteration

fields

which fields of the elements should be returned (optional)

HTTP response

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

{
  "id" : "4028b88161e64f290161e6d832460019",
  "_type" : "automated-suite",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
    },
    "executions" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
    }
  }
}

Response fields

Path Type Description

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

link to the associated executions

Create automated suite from iteration test plan items

A POST to /automated-suite-utils/from-iteration-test-plan-items creates a new automated suite with the given the list of item id in request parameters.

HTTP request

POST /api/rest/latest/automated-suite-utils/from-iteration-test-plan-items HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080

itemIds=888%2C777%2C555

Request parameters

Parameter Description

itemIds

the ids of the iteration test plan items

fields

which fields of the elements should be returned (optional)

HTTP response

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

{
  "id" : "4028b88161e64f290161e6d832460019",
  "_type" : "automated-suite",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
    },
    "executions" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
    }
  }
}

Response fields

Path Type Description

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

link to the associated executions

Create automated suite from test suite

A POST to /automated-suite-utils/from-test-suite creates a new automated suite with the given test suite id in request parameters.

HTTP request

POST /api/rest/latest/automated-suite-utils/from-test-suite HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080

testSuiteId=888

Request parameters

Parameter Description

testSuiteId

the id of the test suite

fields

which fields of the elements should be returned (optional)

HTTP response

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

{
  "id" : "4028b88161e64f290161e6d832460019",
  "_type" : "automated-suite",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
    },
    "executions" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
    }
  }
}

Response fields

Path Type Description

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

link to the associated executions

Execute automated suite

A POST to /automated-suite-utils/{suiteId}/executor executes the automated suite with the given id.

Path parameters

Table 1. /api/rest/latest/automated-suite-utils/{suiteId}/executor
Parameter Description

suiteId

the id of the automated suite

HTTP request

POST /api/rest/latest/automated-suite-utils/4028b88161e64f290161e6d832460019/executor 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-Length: 368
Content-Type: application/json;charset=UTF-8

{
  "id" : "4028b88161e64f290161e6d832460019",
  "_type" : "automated-suite",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019"
    },
    "executions" : {
      "href" : "http://localhost:8080/api/rest/latest/automated-suites/4028b88161e64f290161e6d832460019/executions"
    }
  }
}

Response fields

Path Type Description

id

String

the uuid of the automated suite

_type

String

the type of the entity

_links

Object

related links

Relation Description

self

link to this automated test

executions

link to the associated executions