Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

AnchorTopTopTest 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

...

titleBase URL for Test Instance REST API

REST V1 Authentication
REST V1 Authentication

Table of Contents
maxLevel2

Each function returns a JSON test instance object. The test instance object is an object that has these attributes,

AttributesTypeDescriptionisActiveBooleanThis is a Boolean that tracks whether or not the test instance is active.propertiesList<PropertyValuePojo>This is a list of the Properties associated with the test instance.descriptionStringThis is the description of the test instance.instanceNameStringThis is the unique name of the test instance.instanceCodeStringThis is a code of the test instance.instanceIdLongThis is the unique Id of the test instance.environmentsList<Long>This is a list of the Environment Ids associated with the test instance.testingToolIdLongThis 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.

AttributesTypeDescriptionpropertyNameStringThis is the name of the propertypropertyValueStringThis 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

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 NameProperty Key NameTypeRequiredDescription
JMeter Home DirectoryFDJM_JMETER_HOME_DIRStringYesApache JMeter Home Directory. Make sure you have bin directory under this.
Apache JMeter Properties fileFDJM_JMETER_PROPERTIES_FILEStringYesApache 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 NameProperty Key NameTypeRequiredDescription
FDOAT_RUN_SCRIPTFDOAT_RUN_SCRIPTStringNoOracle Application Test Suite run script file name (.sh or .bat) with full Path.

SoapUI

Property Display NameProperty Key NameTypeRequiredDescription
SoapUI Test Runner Path FDSUI_SOAPUI_PATH_TO_TESTRUNNER_FILEStringYesAbsolute path to the Test runner script for SoapUI testing.

TestNG

There are no properties for TestNG. 

utPLSQL

There are no properties for utPLSQL.

Postman

FDJM_JMETER_HOME_DIR
Property Display NameProperty Key NameTypeRequiredDescription
JMeter Home Directory
Newman Executable PathFDPMN_POSTMAN_PATH_TO_NEWMAN_UTILITYString
YesApache JMeter Home Directory. Make sure you have bin directory under this.Apache JMeter Properties fileFDJM_JMETER_PROPERTIES_FILEStringYesApache 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 NameProperty Key NameTypeRequiredDescriptionFDOAT_RUN_SCRIPTFDOAT_RUN_SCRIPTStringNoOracle Application Test Suite run script file name (.sh or .bat) with full Path.

SoapUI

Property Display NameProperty Key NameTypeRequiredDescriptionSoapUI Test Runner Path FDSUI_SOAPUI_PATH_TO_TESTRUNNER_FILEStringYesAbsolute 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 NameProperty Key NameTypeRequiredDescriptionNewman Executable PathFDPMN_POSTMAN_PATH_TO_NEWMAN_UTILITYStringNoAbsolute path to the newman command line utility for Postman testing.Node Executable PathFDPMN_POSTMAN_PATH_TO_NODEJSStringNoAbsolute path to the Node executable.

Back to Top

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.

...

titleAPI URL

...

NoAbsolute path to the newman command line utility for Postman testing.
Node Executable PathFDPMN_POSTMAN_PATH_TO_NODEJSStringNoAbsolute 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
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance/{Id}

Request

Parameter
Required
Type
Description

Id

YesURL

This is a URL parameter for the Id which is used to find and return an test instance with.

Include Page
REST V1 Test Instance Response
REST V1 Test Instance Response

Response Codes

HTTP Code
Description
200Test Instance was found and returned
400Bad request
401Unauthorized
500Unexpected 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
languagejs
themeEclipse
titleTest Instance - 11101
{
   "isActive": true,
	"properties":    [
            {
         "propertyName": "FDJM_JMETER_HOME_DIR",
         "propertyValue": "Home Directory Patch 1"
      },
            {
         "propertyName": "FDJM_JMETER_PROPERTIES_FILE",
         "propertyValue": "Properties Patch 1"
      }
   ],
   "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/

...

Parameters

Parameter
Required
Type
Description

Id

YesURL

This is a URL parameter for the Id which is used to find and return an test instance with.

Response Codes

HTTP Code
Description
200Test Instance was found and returned400Bad request401Unauthorized500Unexpected 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
languagejs
themeEclipse
titleTest Instance - 11101
{ "isActive": true, "

11101

The GET request would return the  following JSON test instance object

Code Block
languagejs
themeEclipse
titleTest Instance GET Return JSON
{
   "isActive": true,
	"properties":    [
            {
         "propertyName": "FDJM_JMETER_HOME_DIR",
         "propertyValue": "Home Directory Patch 1"
      },
            {
         "propertyName": "FDJM_JMETER_PROPERTIES_FILE",
         "propertyValue": "Properties Patch 1"
      }
   ],
   "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:

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.

Info
titleAPI URLs

http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance

...

The GET request would return the  following JSON test instance object

Code Block
languagejs
themeEclipse
titleTest Instance GET Return JSON
{
   "isActive": true,
	"properties":    [
            {
         "propertyName": "FDJM_JMETER_HOME_DIR",
         "propertyValue": "Home Directory 1"
      },
            {
         "propertyName": "FDJM_JMETER_PROPERTIES_FILE",
         "propertyValue": "Properties 1"
      }
   ],
   "description": "This is Test Instance 1",
   "instanceName": "Test Instance 1",
   "instanceCode": "TESTINST1",
   "instanceId": 11101,
   "environments": [],
   "testingToolId": 10001
}
}

Back to Top

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.

Info
titleAPI 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:

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/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.

Parameters

...

Parameter

...

Required

...

Type

...

Description

...

instanceCode

...

Response Codes

...

HTTP Code

...

Description

...

Example

If we had a test instance in our database with an Id of 11101 and had the following attributes

Code Block
languagejs
themeEclipse
titleTest Instance - 11101
{
   "isActive": true,
	"properties":    [
            {
         "propertyName": "FDJM_JMETER_HOME_DIR",
         "propertyValue": "Home Directory Patch 1"
      },
            {
         "propertyName": "FDJM_JMETER_PROPERTIES_FILE",
         "propertyValue": "Properties Patch 1"
      }
   ],
   "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

?

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/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

NoURL(query)Instance code, equals ignore case
instanceNameNoURL(query)Instance Name, contains ignore case
testingToolNoURL(queryTesting tool name, equals ignore case

Include Page
REST V1 Test Instance Response
REST V1 Test Instance Response

Response Codes

HTTP Code
Description
200Test Instances were found and returned
400Bad request
401Unauthorized
500Unexpected 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
languagejs
themeEclipse
titleTest Instance GET Return JSON- 11101
{
   "isActive": true,
	"properties":    [
            {
         "propertyName": "FDJM_JMETER_HOME_DIR",
         "propertyValue": "Home Directory Patch 1"
      },
            {
         "propertyName": "FDJM_JMETER_PROPERTIES_FILE",
         "propertyValue": "Properties Patch 1"
      }
   ],
   "description": "This is Test Instance 1",
   "instanceName": "Test Instance 1",
   "instanceCode": "TESTINST1",
   "instanceId": 11101,
   "environments": [],
   "testingToolId": 10001
}
}

Back to Top

POST

This POST service will create a new test instance with the same attributes as the given JSON object.

...

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
languagejs
themeEclipse
title

...

Test Instance GET Return JSON
{

...

  

...

 

...

"isActive": true,

...

	"properties":    [

...


            {
         "propertyName": "FDJM_JMETER_HOME_DIR",
  

...

   

...

 

...

 

...

 

...

 "propertyValue": "Home Directory 1"
 

...

 

...

 

...

 

...

 

...

 },

...

            {

...

     

...

 

...

 

...

 

...

 "propertyName": "FDJM_JMETER_PROPERTIES_FILE",
 

...

    

...

 

...

 

...

 

...

 "propertyValue": "Properties 

...

1"

...

  

...

 

...

 

...

 

...

 }

...

  

...

 

...

],

...

   

...

"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
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance

Request

Parameters
Required
Type
Description
isActiveYesBooleanThis is the isActive Boolean which will be given to the created test instance
descriptionNoStringThis is the description which will be given to the created test instance
environmentsNoList<Long>This is list of environment Ids which will be given to the created test instance
instanceCodeYesStringThis is the code which will be given to the created test instance
testingToolIdYesLongThis is the Id for the testing tool that will be given to the created test instance
instanceIdNoLongThis is the Id place holder. This Id is not given because the created test instance will create its own unique Id
instanceNameYesStringThis is the name which will be given to the created test instance
propertiesYes/No
List<PropertyValuePojo>
List<PropertyValue>This is a list of the Properties associated with the test instance.

Include Page
REST V1 Test Instance Response
REST V1 Test Instance Response

Response Codes

HTTP Code
Description
201Instance was created successfully
400Bad request
401Unauthorized
404Instance not found
500Unexpected internal server error

Example

If the POST  request receives the following JSON test instance object,

Code Block
themeEclipse
titlePOST JSON
{
     "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": 21807,
     "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
themeEclipse
titleTest Instance Post Return JSON
{
     "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"
}

Back to Top

...


Info
titleAPI URL

http://host:port/flexdeploy/rest/v1/topology/integrations/testinstance/{Id}


Code Block
themeEclipse
titleSample PUT JSON Request
{
     "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

Parameters
Required
Type
Description
IdYesURLThis is a URL parameter for the Id which is used to find and return an test instance with.
descriptionNoStringThis is the description that the test instance's description will be updated to.
environmentsNoList<Long>This is the list of Environment Ids that will be assigned to the test instance that is being updated.
isActiveYesBooleanThis is the isActive Boolean that the test instance's isActive Boolean will be updated to.
instanceCodeYesStringThis is the code that the test instance's code will be updated to.
testingToolIdYesLongThis 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.
instanceIdNoLongThis is the Id place holder. This Id will not be updated in the test instance.
propertiesYes/NoList<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. 
instanceNameYesStringThis is the name that the test instance's name will be updated to.


...

Back to Top


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
titleEnvironment Adding Functionality

By having an environment in the JSON request the environment will be added and no environments will be unassigned.

...


Code Block
themeEclipse
titleSample JSON Request
{
     "isActive": null,
     "properties": [
          {
          "propertyName": "FDJM_JMETER_HOME_DIR",
          "propertyValue": "Home Directory Put 1"
          },
     ],
     "description": "This is J Meter Put 1",
     "environments": null,
     "testingToolId": 10001,
     "instanceId": 21807,
     "instanceCode": "JMETERPUT1",
     "instanceName": null
}


Parameters

Parameters
Required
Type
Description
IdYesURLThis is a URL parameter for the Id which is used to find and return an test instance with.
descriptionNoStringThis is the description that the test instance's description will be updated to.
environmentsNoList<Long>This is the list of Environment Ids that will be assigned to the test instance that is being updated.
isActiveNoBooleanThis is the isActive boolean that the test instance's isActive boolean will be updated to.
instanceCodeNoStringThis is the code that the test instance's code will be update to.
testingToolIdNoLongThis 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.
instanceIdNoLongThis is the Id place holder. It will not change the test instance's Id that is being updated. 
propertiesNoList<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. 
instanceNameNoStringThis is the name that the test instance's name will be updated to.

Response Codes

HTTP Code
Description
200Test Instance was found and patched
400Bad request
401Unauthorized
404Test Instance not found
500Unexpected 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
themeEclipse
titleTest Instance PATCH JSON
{
     "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/v1/topology/integrations/testinstance/11101

And the PATCH request receives the following JSON test instance object,

Code Block
themeEclipse
titleTest Instance Patch Receive JSON
{
     "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
themeEclipse
titleTest Instance PATCH Return JSON
{
     "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"
}
Back to Top

...