...
Initiate Post Refresh Request
Include Page | ||||
---|---|---|---|---|
|
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
...
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)
...
SoapUI
...
TestNG
There are no properties for TestNG.
utPLSQL
There are no properties for utPLSQL.
Postman
...
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/v1/topology/integrations/testinstance/{Id} |
Request
...
...
...
...
...
Id
...
This is a URL parameter for the Id which is used to find and return an test instance with.
...
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 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)
This GET service will find an test instance by querying based on a code, name, and/or tool name and return the JSON representations of the objects. If no query parameters are given this request will return the entire list of test instances.
...
title | API URLs |
---|
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:
Post refresh requests can be initiated through this API using the POST service.
This POST service will perform the same action found on the Post Refresh requests form off of the Environment Instance page. It will initiate a post refresh request to build and deploy any projects in order to refresh an environment to its original state after that instance has been cloned from another environment. The service will return a post refresh request json object..
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/integrationsenvironmentinstance/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. |
environmentId}/{instanceId}/initiatepostrefresh |
Request
Request
Response Codes
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} |
Request
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.
Parameter | Required | Type | Description |
---|
instanceCode
Instance code, equals ignore case
Equals ignore case search
Instance Name, contains ignore case
Contains ignore case search
Testing tool name, equals ignore case
Equals ignore case search
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 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
This POST service will create a new test instance with the same attributes as the given JSON object.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance |
environmentId | Yes | URL | This is the target environment Id. This is the environment that will be refreshed through builds and deploys. |
instanceId | Yes | URL | This is the instance Id for which the two environments are associated. This instance must be associated with both environments. |
refreshEnvironmentId | Yes | Long | The source environment Id. This is the environment that the target environment will be refreshed from. This is the same environment that would be selected in the refreshed from environment drop down on the post refresh requests screen |
requestedStartDate | No | String | The time when the deployment will be started. Format should yyyy-MM-dd'T'HH:mm:ssXXX. For example, 2019-03-16T21:17:52-06:00 |
Response
Parameter | Type | Description |
---|---|---|
instanceId | Long | The instance Id that was associated with both the target environment and refresh from environment. |
requestedStartTime | String | The requested start time that was given. |
targetEnvironmentId | Long | The Id for the target environment. |
postRefreshId | Long | The post refresh request Id. |
refreshEnvId | Long | The Id for the refresh from environment. |
Response Codes
HTTP Code | Description |
---|
201 | Post refresh request initiated successfully |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 |
Environment 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 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"
} |
When we run a PUT request at 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",
"credentialId": null
},
{
"propertyName": "FDJM_JMETER_PROPERTIES_FILE",
"propertyValue": "Properties File Put 1",
"credentialId": null
}
],
"description": "This is J Meter Put 1",
"environments": [],
"testingToolId": 10001,
"instanceCode": "JMETERPUT1",
"instanceName": "J Meter Put 1"
} |
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. |
...
We can post refresh an environment with Id 10004 from an environment with Id 12345 with the following request. Both environments would be associated with an instance with Id 11101.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/topology/environmentinstance/ |
...
...
...
Request
Response Codes
Example
If we had an test instance in our database with an Id of 11101 and had the following attributes
Code Block |
---|
In response we will receive a post refresh request.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| {
"isActive": true,
"properties": [
| |||||||
{ "propertyNameinstanceId": "FDJM_JMETER_HOME_DIR"22223, "propertyValuerequestedStartTime": "HomeFri DirectoryDec 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,
13 11:01:32 CST 2019",
"targetEnvironmentId": 18802,
"postRefreshId": 54321,
"refreshEnvId": 22331
} |
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,
"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 | ||||
---|---|---|---|---|
| ||||
| ||||
{
"refreshEnvironmentId": 12345
} |