Anchor | ||||
---|---|---|---|---|
|
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.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/topology/integrations/test |
...
Each function returns a JSON test instance object. The test instance object is an object that has these attributes,
Attributes | Type | Description |
---|---|---|
isActive | Boolean | This is a Boolean that tracks whether or not the test instance is active. |
properties | List<PropertyValuePojo> | This is a list of the Properties associated with the test instance. |
description | String | This is the description of the test instance. |
instanceName | String | This is the unique name of the test instance. |
instanceCode | String | This is a code of the test instance. |
instanceId | Long | This is the unique Id of the test instance. |
environments | List<Long> | This is a list of the Environment Ids associated with the test instance. |
testingToolId | Long | This is the Id that correlates to the testing tool used for the test instance. |
Each JSON test instance object contains a list of property value pojo. The property value object has these attributes.
Attributes | Type | Description |
---|---|---|
propertyName | String | This is the name of the property |
propertyValue | String | This is the value of the property |
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.
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/topology/integrations/test? 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/topology/integrations/test?instancecode={code} To search by name only:http://host:port/flexdeploy/rest/topology/integrations/test?instancename={name} To search by tool and name:http://host:port/flexdeploy/rest/topology/test?testingtool={tool}&instancename={name} |
Tip |
---|
The query parameters are not case sensitive. Searching by name=NAME is the same as searching by name=name. |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
instancecode | No | URL(query) | This is a URL query parameter for the code which is used to query the test instances with. |
instancename | No | URL(query) | This is a URL query parameter for the code which is used to query the test instances with. |
testingtool | no | URL(query | This is a URL query parameter for the code which is used to query the test instances with. |
Response Codes
HTTP Code | Description |
---|---|
200 | Test Instances were found and returned |
400 | Bad request |
401 | Unauthorized |
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
...
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/topology/integrations/test/{Id} |
...
Parameters
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. |
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. |
instanceId | No | Long | This is the Id place holder. It will not change the test instance's Id that is being updated. |
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. |
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 |
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" }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties File Put 1" } ], "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/topology/integrations/test/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" }, ], "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" }, { "propertyName": "FDJM_JMETER_PROPERTIES_FILE", "propertyValue": "Properties File Put 1" } ], "description": "This is J Meter Patch 1", "environments": [], "testingToolId": 10001, "instanceId": 21807, "instanceCode": "JMETERPATCH1", "instanceName": "J Meter Put 1" } |
...