-
Notifications
You must be signed in to change notification settings - Fork 9
Configurations
Use the following API methods to request details about Rhino Configurations and to create or modify them.
Returns a list of available Rhino Configurations.
GET /api/v3/configurations
{
"data": {
"configurations": [
{
"id": "03d1cd94-5e38-43d8-b010-e932d92f9067",
"models": [
"7adc7914-2bfe-41f0-9808-422bab5c412b"
],
"tests": [
"8bed8025-3cgf-52g1-0919-533cbc6d523c"
]
},
...
]}
}The example response includes one configuration group, with one elements collection and one tests collection.
| Name | Type | Description |
|---|---|---|
| id | string | The ID of the Rhino Configuration. |
| models | array | All available Rhino Page Models for this Rhino Configuration. |
| tests | array | All available Tests Cases for this Rhino Configuration. |
| Code | Description |
|---|---|
| 200 | Success, the Rhino Collections were returned as part of the response. |
| 500 | Fail, the server encountered an unexpected error. |
Returns an existing Rhino Configuration.
GET /api/v3/configurations/:configuration_id
| Name | Type | Description |
|---|---|---|
| configuration_id | string | The ID of the Rhino Configuration. |
Please see below for a typical response:
{
"name": "Rhino Automation - Chrome & Firefox",
"testsRepository": [
"8bed8025-3cgf-52g1-0919-533cbc6d523c"
],
"driverParameters": [
{
"driver": "ChromeDriver",
"driverBinaries": "http://localhost:4444/wd/hub"
},
{
"driver": "FirefoxDriver",
"driverBinaries": "http://localhost:4444/wd/hub"
}
],
"dataSource": [],
"models": [
"7adc7914-2bfe-41f0-9808-422bab5c412b"
],
"connector": "connector_text",
"gravityEndpoint": "",
"authentication": {
"password": "<rhino_user>",
"userName": "<rhino_password>"
},
"engineConfiguration": {
"maxParallel": 1,
"failOnException": false,
"optimalThreshold": 3.0,
"qualityThreshold": 0.0,
"toleranceThreshold": 0.0,
"priority": 0,
"severity": 0,
"errorOnExitCode": 0,
"elementSearchingTimeout": 15000,
"pageLoadTimeout": 60000,
"retrunExceptions": true,
"returnPerformancePoints": true,
"returnEnvironment": true,
"terminateOnAssertFailure": false
},
"screenshotsConfiguration": {
"keepOriginal": false,
"returnScreenshots": false,
"screenshotsOut": "<path_to_screenshots_folder>",
"onExceptionOnly": false
},
"reportConfiguration": {
"reportOut": "<path_to_reports_folder>",
"logsOut": "<path_to_logs_folder>",
"reporters": null,
"connectionString": null,
"dataProvider": null,
"archive": false,
"localReport": true,
"addGravityData": true
}
}The following system fields are always included in the response:
| Name | Type | Description |
|---|---|---|
| name | string | The name of this Rhino Configuration. |
| testsRepository | array | A collection of folders and files in which there are Rhino Test Cases. |
| driverParameters | array | A collection of parameters which represents the target platforms on which the tests will run. |
| dataSource | array | A collection of data objects which will be cascaded as primary table for all Rhino Test Cases. |
| models | array | A collection of Rhino Page Models sources. |
| connector | string | Connector implementation type to use with this Rhino Configuration. |
| gravityEndpoint | string | Gravity Server endpoint. Use to send requests using remote gravity service instead of embedded service. |
| authentication | string | User name and password for authentication on Rhino Service. |
| engineConfiguration | object | Configure the automation engine behavior. |
| screenshotsConfiguration | object | Configure the screenshot behavior. |
| reportConfiguration | object | Configure the reporting behavior. |
| Name | Type | Description |
|---|---|---|
| userName | string | A valid Rhino API user name. |
| password | string | A valid Rhino API password. |
| Name | Type | Description |
|---|---|---|
| maxParallel | number | The maximum number of tests that will be executed in parallel. |
| failOnException | boolean | When set to true, test cases will fail if exceptions were thrown during test regardless of assertions passed or failed. |
| optimalThreshold | decimal | Any test which violates this threshold (in minutes), will be marked as non-optimal. |
| qualityThreshold | decimal | Any test which violates this threshold (in percents), will be marked as failed. |
| toleranceThreshold | decimal | Any test which falls within this threshold (in percents), will be marked as warning when fail. |
| priority | number | All tests with priority lower than this number will be marked as warning when fail. |
| severity | number | All tests with severity lower than this number will be marked as warning when fail. |
| errorOnExitCode | number | The error code (console application error code) which will cause the CI/CD process to fail. |
| elementSearchingTimeout | number | The timeout in millisecond when searching for elements. |
| pageLoadTimeout | number | The timeout in millisecond when loading a page or application. |
| retrunExceptions | boolean | When set to false, exceptions will not be returned by Gravity engine. This might affect the tests results. |
| returnPerformancePoints | boolean | When set to false, performance data will not be returned by Gravity engine. This might affect the tests results. |
| returnEnvironment | boolean | When set to true, will return the current Gravity Environment parameters. |
| terminateOnAssertFailure | boolean | When set to true, automation will stop if assertion any assertion action failed. |
| Integration | string | 3rd party platform integration. Available integrations are, BrowserStack and LambdaTest. |
| Name | Type | Description |
|---|---|---|
| keepOriginal | boolean | When set to true, will keep the original file created by Gravity engine, when creating a new Rhino report. |
| onExceptionOnly | boolean | When set to true, returns a screenshot only if exception was thrown during execution. |
| returnScreenshots | boolean | When set to false, screenshots will be returned from Gravity engine. |
| screenshotsOut | decimal | The directory in which to save automatic screenshots. |
| Name | Type | Description |
|---|---|---|
| reportOut | string | The directory in which to save reports. |
| logsOut | string | The directory in which to save logs. |
| reporters | array | Reporters implementations to use with this configuration. |
| connectionString | string | The reporter connection string (if needed or used by the provided implementations). |
| dataProvider | string | The reporter data provider (if needed or used by provided implementations). |
| archive | boolean | When set to true, will archive the report out folder as zip file and delete the original folder. |
| localReport | boolean | When set to false, will not generate Rhino report. |
| addGravityData | boolean | When set to true, will save Gravity API requests and response along with the reports and logs information. |
| Code | Description |
|---|---|
| 200 | Success, the Configuration was returned as part of the response. |
| 404 | Not Found, the Configuration was not found under the configurations collection. |
| 500 | Fail, the server encountered an unexpected error. |
Creates a new Rhino Configuration.
POST /api/v3/configurations
The request body follows the same format as Get Configuration response content.
{
"name": "Rhino Automation - Chrome & Firefox",
"testsRepository": [ ],
"driverParameters": [
{
"driver": "ChromeDriver",
"driverBinaries": "http://localhost:4444/wd/hub"
},
{
"driver": "FirefoxDriver",
"driverBinaries": "http://localhost:4444/wd/hub"
}
],
"dataSource": [],
"models": [ ],
"connector": "connector_text",
"gravityEndpoint": "",
"authentication": {
"password": "<rhino_user>",
"userName": "<rhino_password>"
},
"engineConfiguration": {
"maxParallel": 1,
"failOnException": false,
"optimalThreshold": 3.0,
"qualityThreshold": 0.0,
"toleranceThreshold": 0.0,
"priority": 0,
"severity": 0,
"errorOnExitCode": 0,
"elementSearchingTimeout": 15000,
"pageLoadTimeout": 60000,
"retrunExceptions": true,
"returnPerformancePoints": true,
"returnEnvironment": true,
"terminateOnAssertFailure": false
},
"screenshotsConfiguration": {
"keepOriginal": false,
"returnScreenshots": false,
"screenshotsOut": "<path_to_screenshots_folder>",
"onExceptionOnly": false
},
"reportConfiguration": {
"reportOut": "<path_to_reports_folder>",
"logsOut": "<path_to_logs_folder>",
"reporters": null,
"connectionString": null,
"dataProvider": null,
"archive": false,
"localReport": true,
"addGravityData": true
}
}| Code | Description |
|---|---|
| 201 | Success, the Configuration created and identifier was returned as part of the response. |
| 400 | Bad Request, the request is missing a mandatory field(s) or bad formatted. |
| 500 | Fail, the server encountered an unexpected error. |
Updates an existing Rhino Configuration.
PUT /api/v3/configurations/:configuration_id
| Name | Type | Description |
|---|---|---|
| configuration_id | string | The ID of the Rhino Configuration. |
The request body follows the same format as Get Configuration Response Content.
{
"name": "Rhino Automation - Chrome & Firefox - After Update",
"testsRepository": [ ],
"driverParameters": [
{
"driver": "ChromeDriver",
"driverBinaries": "http://localhost:4444/wd/hub"
},
{
"driver": "FirefoxDriver",
"driverBinaries": "http://localhost:4444/wd/hub"
}
],
"dataSource": [],
"models": [ ],
"connector": "connector_text",
"gravityEndpoint": "",
"authentication": {
"password": "<rhino_user>",
"userName": "<rhino_password>"
},
"engineConfiguration": {
"maxParallel": 1,
"failOnException": false,
"optimalThreshold": 3.0,
"qualityThreshold": 0.0,
"toleranceThreshold": 0.0,
"priority": 0,
"severity": 0,
"errorOnExitCode": 0,
"elementSearchingTimeout": 15000,
"pageLoadTimeout": 60000,
"retrunExceptions": true,
"returnPerformancePoints": true,
"returnEnvironment": true,
"terminateOnAssertFailure": false
},
"screenshotsConfiguration": {
"keepOriginal": false,
"returnScreenshots": false,
"screenshotsOut": "<path_to_screenshots_folder>",
"onExceptionOnly": false
},
"reportConfiguration": {
"reportOut": "<path_to_reports_folder>",
"logsOut": "<path_to_logs_folder>",
"reporters": null,
"connectionString": null,
"dataProvider": null,
"archive": false,
"localReport": true,
"addGravityData": true
}
}| Code | Description |
|---|---|
| 200 | Success, the Configuration was returned as part of the response. |
| 400 | Bad Request, the request is missing a mandatory field(s) or bad formatted. |
| 404 | Not Found, the Configuration was not found under the configurations collection. |
| 500 | Fail, the server encountered an unexpected error. |
Deletes an existing Rhino Configuration.
DELETE /api/v3/configurations/:configuration_id
| Name | Type | Description |
|---|---|---|
| configuration_id | string | The ID of the Rhino Configuration. |
Please Note: Deleting a configuration cannot be undone. It does not, however, affect test cases/models.
| Code | Description |
|---|---|
| 204 | Success, the Configuration was deleted. |
| 404 | Not Found, the Configuration was not found under the configurations collection. |
| 500 | Fail, the server encountered an unexpected error. |
Deletes all existing Rhino Configuration for the authenticated user.
DELETE /api/v3/configurations
Please Note: Deleting a configuration cannot be undone. It does not, however, affect test cases/models.
| Code | Description |
|---|---|
| 204 | Success, the Configurations were deleted. |
| 500 | Fail, the server encountered an unexpected error. |