Test types can be accessed using GET service.
Include Page |
---|
| REST V1 Authentication |
---|
| REST V1 Authentication |
---|
|
Each function returns a JSON test type object. The test type object is an object that has these attributes.
...
GET
GET (Using Query Parameters)
Info |
---|
title | Base URL for Test Type REST APIAPI URL |
---|
|
http://host:port/flexdeploy/rest/v1/administration/testautomation/testtype http://host:port/flexdeploy/rest/v1/administration/testautomation/testtype/{testTypeId} http://host:port/flexdeploy/rest/v1/administration/testautomation/testtype?testtypenametestTypeName={name} |
The information about available Test Types can be accessed through this method. It returns the name and id of all available Test Types. You can also search by id or by name using query parameters to access a specific Test Type's information.
Request
Attributes | Type | Description |
---|
testTypeId | Long | Id of test type |
testTypeName | String | Contains ignore case search (Query Parameter) |
Response
Attributes | Type | Description |
---|
testTypeId | Long | Id of test type |
testTypeName | String | Name of test type |
Response Codes
200 | Search successful and results returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example Output
Assuming our environment contains 3 Test Types:
- 10001 - Unit Test
- 10002 - Functional Test
- 10003 - Integration Test
Using http://host:port/flexdeploy/rest/v1/administration/testautomation/testtype, we receive a JSON response with a list of all the Test Types:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | Test types |
---|
|
[
{
"testTypeName": "Test1Unit Test",
"testTypeId": 10001
},
{
"testTypeName": "Test2Functional Test",
"testTypeId": 10002
},
{
"testTypeName": "Test3Integration Test",
"testTypeId": 10003
}
] |
Using http://host:port/flexdeploy/rest/v1/administration/testautomation/testtype/10001, we receive back a JSON response with one Test Type object:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | Test types |
---|
|
{
"testTypeName": "Unit Test",
"testTypeId": 10001
} |
Using http://host:port/flexdeploy/rest/v1/administration/testautomation/testtype?testTypeName=Functional we receive back a JSON response with a list of all the Test Types containing the passed name:
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | Test types |
---|
|
[
{
"testTypeName": "Functional Test",
"testTypeId": 10002
}
] |