A tool to help manually test element.json files with the cloudelements-cehandler.
A very simple app to help in reading element.json files and then make requests to element endpoints via the cloudelements-cehandler package.
Note: Although this repo is public, it relies on
cloudelements-cehandlerwhich is a private Cloud Elements package.
If you don't have node and npm installed, do that first.
PROTIP:
nodeversion must be >=v4.0.0
Install the node dependencies.
# Navigate to this directory
$ cd /path/to/axway-element-test-helper
# Install all necessary npm packages:
$ npm installTo simply list all resources of an element.json file use the following command:
$ node index.js list-resources /path/to/element.jsonTo make a request to one of the supported resources in the element.json, create a request body file - this file can be located anywhere on the file system, but it's recommended to be placed in the requests directory under the name of the api, in the format of method-resource.json where resource is a dash-separated resource, ex. a GET to /contacts/{id} would be get-contacts-id.json.
Then use the below command to execute the request:
$ node index make-request /path/to/element.json /path/to/request-body.jsonExamples:
$ node index.js make-req /path/to/element.json requests/zendesk/get-contacts.jsonThe result of your call will be logged in the terminal.