Test Test Instances can be accessed and modified through this API using four services: GET, POST, PUT, and PATCH. These four services allow for the retrieval, creation, complete update, and partial update of test instances.
Include Page REST V1 Authentication REST V1 Authentication
Table of Contents | ||
---|---|---|
|
Testing Tools
Currently there are 8 different testing tools that are supported out of box in Flex Deploy, but you can add your own testing tools as well.
Apache JMeter
Property Display Name | Property Key Name | Type | Required | Description |
---|---|---|---|---|
JMeter Home Directory | FDJM_JMETER_HOME_DIR | String | Yes | Apache JMeter Home Directory. Make sure you have bin directory under this. |
Apache JMeter Properties file | FDJM_JMETER_PROPERTIES_FILE | String | Yes | Apache JMeter Properties file. |
HP Unified Functional Testing
There are no properties for HP Unified Functional Testing.
JUnit
There are no properties for JUnit.
Oracle Application Test Suite (OATS)
Property Display Name | Property Key Name | Type | Required | Description |
---|---|---|---|---|
FDOAT_RUN_SCRIPT | FDOAT_RUN_SCRIPT | String | No | Oracle Application Test Suite run script file name (.sh or .bat) with full Path. |
SoapUI
Property Display Name | Property Key Name | Type | Required | Description |
---|---|---|---|---|
SoapUI Test Runner Path | FDSUI_SOAPUI_PATH_TO_TESTRUNNER_FILE | String | Yes | Absolute path to the Test runner script for SoapUI testing. |
TestNG
There are no properties for TestNG.
utPLSQL
There are no properties for utPLSQL.
Postman
Property Display Name | Property Key Name | Type | Required | Description |
---|---|---|---|---|
Newman Executable Path | FDPMN_POSTMAN_PATH_TO_NEWMAN_UTILITY | String | No | Absolute path to the newman command line utility for Postman testing. |
Node Executable Path | FDPMN_POSTMAN_PATH_TO_NODEJS | String | No | Absolute path to the Node executable. |
GET
There are two implementations of GET. One will find a test instance with the given Id and return the JSON representation of the test instance. The other will find a list of test instances matching the parameters supplied to it.
GET (Using Id)
This GET service will find an test instance with the given Id and return the JSON representation of the object.
...
Request
Parameter | Required | Type | Description |
---|---|---|---|
Id | Yes | URL | This is a URL parameter for the Id which is used to find and return an test instance with. |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
200 | Test Instance was found and returned |
400 | Bad request |
401Unauthorized | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Test instance not found |
500 | Unexpected internal server error |
Example
If we had a test instance in our database with an Id of 11101 and had the following attributes
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory Patch 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties Patch 1", "credentialId": null } ], "description": "This is Test Instance 1", "instanceName": "Test Instance 1", "instanceCode": "TESTINST1", "instanceId": 11101, "environments": [], "testingToolId": 10001 } } |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance/11101
The GET request would return the following JSON test instance object
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties 1", "credentialId": null } ], "description": "This is Test Instance 1", "instanceName": "Test Instance 1", "instanceCode": "TESTINST1", "instanceId": 11101, "environments": [], "testingToolId": 10001 } } |
GET (Using Query Parameters)
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance? Append the following character sequences to the above URL to specify Query parameters.Use '&' between successive query parameters:instanceCode={code} instanceName={name} testingTool={tool} Examples:To search by code only: http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance?instanceCode={code} To search by name only: http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance?instanceName={name} To search by tool and name: http://host:port/flexdeploy/rest/v1/topology/testinstance?testingTool={tool}&instanceName={name} |
Tip |
---|
The query parameters are not case sensitive. Searching by instanceCode=instanceCode is the same as searching by instanceCode=INSTANCECODE. |
Request
Parameter | Required | Type | Description |
---|---|---|---|
instanceCode | No |
Query - String | Instance code, equals ignore case Equals ignore case search |
instanceName | No |
Query - String | Instance Name, contains ignore case Contains ignore case search |
testingTool | No |
Query - String | Testing tool name, equals ignore case Equals ignore case search |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
200 | Test Instances were found and Search successful and results returned |
400 | Bad request |
401Unauthorized | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example
If we had a test instance in our database with an Id of 11101 and had the following attributes
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory Patch 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties Patch 1", "credentialId": null } ], "description": "This is Test Instance 1", "instanceName": "Test Instance 1", "instanceCode": "TESTINST1", "instanceId": 11101, "environments": [], "testingToolId": 10001 } } |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance?code=TESTINST1&name=Test%20Instance%201
The GET request would return the following JSON test instance object
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties 1", "credentialId": null } ], "description": "This is Test Instance 1", "instanceName": "Test Instance 1", "instanceCode": "TESTINST1", "instanceId": 11101, "environments": [], "testingToolId": 10001 } } |
POST
...
Request
Parameters | Required | Type | Description |
---|---|---|---|
isActive | Yes | Boolean | This is the isActive Boolean which will be given to the created test instance |
description | No | String | This is the description which will be given to the created test instance |
environments | No | List<Long> | This is list of environment Ids which will be given associated to the created test instance |
instanceCode | Yes | String | This is the code which will be given to the created test instance |
testingToolId | Yes | Long | This is the Id for the testing tool that will be given to the created test instance |
instanceName | Yes | String | This is the name which will be given to the created test instance |
properties | Yes/No | List<PropertyValue> | This is a list of the Properties associated configured with the test instance. |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description | |
---|---|---|
201 | Instance was created successfully | |
400 | Bad request | |
401Unauthorized | Authentication failure | |
404 | Instance not found403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example
If the POST request receives the following JSON test instance object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties File 1", "credentialId": null } ], "description": "This is J Meter Post 1", "environments": [], "testingToolId": 10001, "instanceCode": "JMETERPOST1", "instanceName": "J Meter Post 1" } |
The following test instance object will then be created as a new row in the database.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties File 1", "credentialId": null } ], "description": "This is J Meter Post 1", "environments": [], "testingToolId": 10001, "instanceId": 11101, "instanceCode": "JMETERPOST1", "instanceName": "J Meter Post 1" } |
PUT
This PUT service will update all attributes of a test instance with the given Id based on the attributes of a JSON object parameters.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance/{Id} |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"isActive": true,
"properties": [
{
"propertyName": "FDJM_JMETER_HOME_DIR",
"propertyValue": "Home Directory Put 1"
},
{
"propertyName": "FDJM_JMETER_PROPERTIES_FILE",
"propertyValue": "Properties File Put 1"
}
],
"description": "This is J Meter Put 1",
"environments": [],
"testingToolId": 10001,
"instanceId": 11101,
"instanceCode": "JMETERPUT1",
"instanceName": "J Meter Put 1"
} |
Parameters
Response Codes
...
...
...
Example
If we had a test instance in our database with an Id of 11101 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{
"isActive": true,
"properties": [
{
"propertyName": "FDJM_JMETER_HOME_DIR",
"propertyValue": "Home Directory 1"
},
{
"propertyName": "FDJM_JMETER_PROPERTIES_FILE",
"propertyValue": "Properties File 1"
}
],
"description": "This is J Meter Post 1",
"environments": [],
"testingToolId": 10001,
"instanceId": 11101,
"instanceCode": "JMETERPOST1",
"instanceName": "J Meter Post 1"
} |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance/11101
...
Request
Parameters | Required | Type | Description |
---|---|---|---|
Id | Yes | URL | This is a URL parameter for the Id which is used to find and return an test instance with. |
description | No | String | This is the description that the test instance's description will be updated to. |
environments | No | List<Long> | This is the list of Environment Ids that will be assigned to the test instance that is being updated. If currently associated environment(s) are not in input list those environments will be unassigned from this instance. i.e. at the end of successful request, test instance will have mapped environments matching to input request. |
isActive | Yes | Boolean | This is the isActive Boolean that the test instance's isActive Boolean will be updated to. |
instanceCode | Yes | String | This is the code that the test instance's code will be updated to. |
testingToolId | Yes | Long | This is the testingToolId that the test instance already has. If this Id is different than what the current testingToolId of the test instance an exception will be thrown. |
properties | Yes/No | List<PropertyPojo> | This is the list of Properties that will be updated in the test instance. The JSON object must have all of the properties of the test instance's testing tool. Value for properties not included in input request will be cleared. |
instanceName | Yes | String | This is the name that the test instance's name will be updated to. |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
200 | Instance was found and updated |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Instance not found |
500 | Unexpected internal server error |
Example
If we had a test instance in our database with an Id of 11101 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory Put 1" 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties File Put 1", "credentialId": null } ], "description": "This is J Meter PutPost 1", "environments": [], "testingToolId": 10001, "instanceId": 2180711101, "instanceCode": "JMETERPUT1JMETERPOST1", "instanceName": "J Meter PutPost 1" } |
The When we run a PUT request would then update the test instance with Id 11101 and return the following JSON test instance objectat the following URL
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance/11101
And the PUT request recieves the following JSON test instace object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory Put 1" Put 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties File Put 1", "credentialId": null } ], "description": "This is J Meter Put 1", "environments": [], "testingToolId": 10001, "instanceId": 21807, "instanceCode": "JMETERPUT1", "instanceName": "J Meter Put 1" } |
PATCH
This PATCH service will update an existing test instance with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the test instance.
Info | ||
---|---|---|
| ||
By having an environment in the JSON request the environment will be added and no environments will be unassigned. |
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance/{Id} |
...
theme | Eclipse |
---|---|
title | Sample JSON Request |
...
The PUT request would then update the test instance with Id 11101 and return the following JSON test instance object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory Put 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_ |
...
PROPERTIES_ |
...
FILE", "propertyValue": " |
...
Properties |
...
File Put 1", "credentialId": null } |
...
],
"description": "This is J Meter Put 1",
"environments": |
...
[], "testingToolId": 10001, |
...
"instanceId": 21807,
"instanceCode": "JMETERPUT1",
"instanceName": "J Meter Put 1"
} |
PATCH
This PATCH service will update an existing test instance with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the test instance.
Info | ||
---|---|---|
| ||
By having an environment in the JSON request the environment will be added and no environments will be unassigned. |
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance/{Id} |
Request
Parameters | Required | Type | Description |
---|---|---|---|
Id | Yes | URL | This is a URL parameter for the Id which is used to find and return an test instance with. |
description | No | String | This is the description that the test instance's description will be updated to. |
environments | No | List<Long> | This is the |
list of Environment Ids that will be assigned to the test instance that is being updated. If environments already associated with test instance are not part of input list they will not be unassigned. i.e. only new environment assignments are done. | |||
isActive | No | Boolean | This is the isActive boolean that the test instance's isActive boolean will be updated to. |
instanceCode | No | String | This is the code that the test instance's code will be update to. |
testingToolId | No | Long | This is the testingToolId that the test instance already has. If this Id is different than what the current testingToolId of the test instance an exception will be thrown |
. |
properties | No | List<PropertyPojo> | This is the list of Properties that will be updated in the test instance. The JSON object doesn't need to have all of the properties of the test instance's testing tool. |
Values provided in input list are the only ones updated. | |||
instanceName | No | String | This is the name that the test instance's name will be updated to. |
Response Codes
HTTP Code | Description | ||
---|---|---|---|
200 | Test Instance was found and patched | ||
400 | Bad request | 401 | Unauthorized |
401 | Authentication failure | ||
403 | Authorization failure (no access to resource) | ||
404 | Test Instance not found | ||
500 | Unexpected internal server error |
Example
If we had an test instance in our database with an Id of 11101 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory Put 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties File Put 1", "credentialId": null } ], "description": "This is J Meter Put 1", "environments": [], "testingToolId": 10001, "instanceId": 21807, "instanceCode": "JMETERPUT1", "instanceName": "J Meter Put 1" } |
When we run a PATCH request at the following URL
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance/11101
And the PATCH request receives the following JSON test instance object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "isActive": null, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory Patch 1", "credentialId": null }, ], "description": "This is J Meter Patch 1", "environments": null, "testingToolId": 10001, "instanceId": 21807, "instanceCode": "JMETERPATCH1", "instanceName": null } |
The PUT request would then update the test instance with Id 11101 and return the following JSON test instance object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "isActive": true, "properties": [ { "propertyName": "FDJM_JMETER_HOME_DIR", "propertyValue": "Home Directory Patch 1", "credentialId": null }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties File Put 1", "credentialId": null } ], "description": "This is J Meter Patch 1", "environments": [], "testingToolId": 10001, "instanceId": 21807, "instanceCode": "JMETERPATCH1", "instanceName": "J Meter Put 1" } |