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 user 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 |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
|
which type of the element should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
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 |
---|---|---|
|
|
the list of elements for that page |
|
|
the page size for that query |
|
|
total number of elements the user is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
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
Parameter | Description |
---|---|
|
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 |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 368
{
"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 |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
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
Parameter | Description |
---|---|
|
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 |
---|---|
|
number of the page to retrieve (optional) |
|
size of the page to retrieve (optional) |
|
which attributes of the returned entities should be sorted on (optional) |
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
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 |
---|---|---|
|
|
the automated execution extenders of this automated suite |
|
|
the page size for that query |
|
|
total number of elements the user is allowed to read |
|
|
how many pages can be browsed |
|
|
the page number |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to the first page (optional) |
|
link to the previous page (optional) |
|
link to this page |
|
link to the next page (optional) |
|
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
Content-Type: application/json
Accept: application/json
Host: localhost:8080
iterationId=486
Request parameters
Parameter | Description |
---|---|
|
the id of the iteration |
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 368
{
"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 |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
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
Content-Type: application/json
Accept: application/json
Host: localhost:8080
itemIds=888%2C777%2C555
Request parameters
Parameter | Description |
---|---|
|
the ids of the iteration test plan items |
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 368
{
"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 |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
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
Content-Type: application/json
Accept: application/json
Host: localhost:8080
testSuiteId=888
Request parameters
Parameter | Description |
---|---|
|
the id of the test suite |
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 368
{
"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 |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
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
Parameter | Description |
---|---|
|
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 |
---|---|
|
which fields of the elements should be returned (optional) |
HTTP response
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 368
{
"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 |
---|---|---|
|
|
the uuid of the automated suite |
|
|
the type of the entity |
|
|
related links |
Links
Relation | Description |
---|---|
|
link to this automated test |
|
link to the associated executions |