# Bespoken Integrations

We offer a variety of integations with external systems. The integrations come in three basic forms:

  • Generating Tests from Flow Definitions
  • Generating Tests from Test Plans
  • Publishing Results

For generating tests, our system will analyze flows or test plans in the source system and turn these into automated tests. This can be useful for getting started faster with your automated testing.

For generating tests from flow definitions, we support the following Conversational AI systems:

  • Amazon Lex
  • Genesys Cloud CX
  • Google Dialogflow
  • VoiceFlow

For generating tests from test plans, we support the following testing tools:

  • CSV/Excel
  • QTest
  • TestRail

For publishing test results, we support the following reporting/issue-tracking tools:

To enable any of these integrations, simply drop us a line at support@bespoken.io.

# Amazon CloudWatch

# Integration Behavior

The CloudWatch Integration will publish metrics to Amazon CloudWatch Metrics using the PutMetricData API (opens new window).

Two metrics will be published for each test that is run:

  • TEST_PASSED - 0 or 1
  • TEST_FAILED - 0 or 1

Additionally, the following dimensions will be published for each metric:

  • TEST_SUITE_NAME
  • TEST_NAME

The test results will all be published under the namespace BESPOKEN

# Integration Configuration

Follow these steps to setup the Amazon CloudWatch integration.

Get your API key from the Dashboard

  • Go to the three dots on the top-right
  • Click on My Account
  • Copy the API key from the field on the lower-left of the page

Add the integration
Call our integration API, as described here (opens new window).

The payload should look like this:

{
    "credentials": {
        "AWS_ACCESS_KEY_ID": "<AWS_ACCESS_KEY_ID>",
        "AWS_SECRET_ACCESS_KEY": "<AWS_SECRET_ACCESS_KEY>",
        "REGION": "<AWS_REGION>"
    },
    "type": "CLOUDWATCH"
}

Example call with CURL

curl --location 'https://monolith.bespoken.io/api/integration?api-key=api-gSHR22xOIETAopGS8EufCX5M7TM2' \
    --header 'Content-Type: application/json' \
    --data '{
        "credentials": {
            "AWS_ACCESS_KEY_ID": "ACCESS_KEY_ID",
            "AWS_SECRET_ACCESS_KEY": "AWS_SECRET_ACCESS_KEY",
            "REGION": "us-east-1"
     },
    "type": "CLOUDWATCH"
}'

# Webhook Integration

# Webhook Behavior

The webhook will be called at the end of each test. It will call the registered webhook with the following payload:

{
    "event": "EVENT_NAME",
    "payload": "PAYLOAD"
}

In the case of the AFTER_TEST event, the payload will look like this:

{
    "error": {
        message: "ERROR_MESSAGE"
    },
    "interactions": [
        {
            "actualValue": "ACTUAL_VALUE",
            "expectedValue": "EXPECTED_VALUE",
            "status": "PASS | FAIL"
        },
    ]
    "status": "PASS | FAIL",
    "test": {
        "name": "TEST_NAME",
        "testSuite": {
            "TEST_SUITE_NAME"
        }
    }
}

The TestResult class (opens new window), part of the Bespoken Node.js SDK (opens new window), can be used to parse the payload.

# Integration Configuration

Follow these steps to setup the Amazon CloudWatch integration.

Get your API key from the Dashboard

  • Go to the three dots on the top-right
  • Click on My Account
  • Copy the API key from the field on the lower-left of the page

Add the integration
Call our integration API, as described here (opens new window).

The payload should look like this:

{
    "settings": {
        "URL": "WEBHOOK_URL"
    },
    "type": "WEBHOOK"
}