Integrations Configuration - TestlumFramework/Testlum GitHub Wiki

Integrations Configuration

integrations.xml - is made to set up integrations with API, Database etc.

Supported Integrations

Inside integration.xml file there is a set of integrations out-of-the-box:

apis
The apis integration helps manage API testing, allowing seamless interaction with RESTful APIs.

websockets
The websockets integration provides support for WebSocket-based testing, useful for real-time communication scenarios.

clickhouse
ClickHouse integration allows efficient testing and querying for large-scale analytical databases.

dynamo
Integrate with Amazon DynamoDB for fast and scalable NoSQL database testing.

elasticsearch
Use Elasticsearch integration for indexing and searching data in real-time with distributed data storage.

kafka
The Kafka integration facilitates messaging and stream processing, supporting high-throughput systems.

mongo
The MongoDB integration enables testing of NoSQL databases that store data in flexible, JSON-like formats.

mysql
With MySQL integration, you can test relational databases and execute SQL queries effectively.

oracle
OracleDB integration lets you perform tests on enterprise-level relational databases.

postgres
PostgreSQL integration supports complex queries and data management for powerful relational databases.

rabbitmq
The RabbitMQ integration allows testing of message queues for asynchronous communication in your applications.

redis
Test your caching and message brokering with the Redis integration.

s3
Use S3 integration to perform tests on scalable object storage with Amazon S3-compatible systems.

sendgrid
SendGrid integration helps test email sending and delivery functionality within your application.

ses
The SES integration enables testing of Amazon's Simple Email Service (SES) for email-related operations.

sqs
The SQS integration supports testing Amazon Simple Queue Service (SQS) for reliable message queuing.

graphQl
GraphQL integration lets you test and query APIs efficiently using GraphQL schema.

lambdaIntegration
The Lambda integration allows invoking AWS Lambda functions during testing to simulate serverless compute scenarios.

smtpIntegration
Use the SMTP integration to test email sending through various SMTP servers.

twilioIntegration
Twilio integration enables you to test SMS and voice functionalities using the Twilio API.

When setting up a integration.xml file, for each integration tag in the structure there is a mandatory and unique alias parameter, with the help of which we get interaction with databases and APIs within the test scenario.

Each service has a flag enabled: true & false which means whether the integration will be connected or not.

Configure the services you need and easily switch between them.

API

Apis

apis - is a command for API integration. It means, that you are able to integrate as many APIs for your test scenarios as you need.

<apis>
    <api alias="ALIAS_1" url="http://URL" enabled="true"/>
    <api alias="ALIAS_2" url="http://URL" enabled="false">
        <auth authStrategy="basic"/>
    </api>
</apis>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias for the specific API. You can come up with your alias for your test scenarios to choose what API to use
url String true - URL for the specific API

auth

Configuration for automatic authentication in API testing

<apis>
    <api alias="ALIAS" url="http://URL" enabled="true">
        <auth authStrategy="basic" tokenName="token" autoLogout="true"/>
    </api>
</apis>

🧾 Attributes

Attribute Type Required Default Description
authStrategy basic/default/custom/jwt true default You can choose desired auth strategy
autoLogout Boolean false true When selected, Testlum will log out after test execution
authCustomClassName String only if with custom authStrategy - Attribute for custom auth strategy. We can create custom processing of authentication for your API or you can do it by yourself
tokenName String only with jwt authStrategy token JPath to grab accessToken from response of login endpoint
WebSockets

WebSockets

websockets - is a command for Websocket API integration.

<websockets>
    <api alias="ALIAS_1" url="ws://URL" protocol="stomp" enabled="true"/>
    <api alias="ALIAS_2" url="wss://URL" protocol="standard" enabled="false"/>
</websockets>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
url String true - URL for Websocket API
protocol standart/stomp true - Choice of protocol for Websocket API
ClickHouse

ClickHouse

clickhouseIntegration - is a command for ClickHouse integration.

<clickhouseIntegration>
        <clickhouse alias="CLICKHOUSE_0" enabled="true" truncate="true">
            <jdbcDriver>ru.yandex.clickhouse.ClickHouseDriver</jdbcDriver>
            <username>test</username>
            <password>test</password>
            <connectionUrl>jdbc:clickhouse://localhost:8123/test_db</connectionUrl>
        </clickhouse>
</clickhouseIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
jdbcDriver String true - JDBC Driver URL for perform connection and query execution inside Testlum
username String true - Username for connection to DB
password String true - Password for connection to DB
connectionUrl String true - Connection URL to DB. With host, port and db name
DynamoDB

Dynamo

dynamoIntegration - is a command for DynamoDB integration.

<dynamoIntegration>
        <dynamo alias="DYNAMO_0" enabled="true" truncate="true">
            <region>eu-central-1</region>
            <endpoint>http://localhost:8100</endpoint>
            <accessKeyId>DEFAULT_ACCESS_KEY</accessKeyId>
            <secretAccessKey>DEFAULT_SECRET_KEY</secretAccessKey>
            <sessionToken>DEFAULT_SESSION_TOKEN</sessionToken>
        </dynamo>
</dynamoIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
region String true - AWS region where your DynamoDB instance is hosted (e.g., us-east-1)
endpoint String true - Custom endpoint URL for DynamoDB (useful for local setups like http://localhost:8000).
accessKeyId String true - AWS Access Key ID used for authentication
secretAccessKey String true - AWS Secret Access Key used for authentication
sessionToken String false - Optional AWS Session Token if using temporary credentials
ElasticSearch

ElasticSearch

elasticsearchIntegration - is a command for ElasticSearch integration.

<elasticsearchIntegration>
        <elasticsearch alias="ELASTIC_0" enabled="true" truncate="true">
            <host>localhost</host>
            <port>9200</port>
            <scheme>http</scheme>
            <connectionTimeout>30000</connectionTimeout>
            <socketTimeout>30000</socketTimeout>
            <signer>false</signer>
            <serviceName>DISABLED</serviceName>
            <region>DISABLED</region>
            <username>elastic</username>
            <password>q98374fkjdkfuyqiweysdc</password>
        </elasticsearch>
</elasticsearchIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
host String true - Hostname or IP address of the Elasticsearch server (e.g., localhost)
port Integer true - Port on which Elasticsearch is running
scheme String true - Connection scheme (either http or https)
connectionTimeout Integer false - Timeout (in milliseconds) for establishing a connection
socketTimeout Integer false - Timeout (in milliseconds) for waiting for data (socket read timeout)
signer Boolean false - Whether AWS request signing is enabled (for AWS-hosted Elasticsearch)
serviceName String false - AWS service name (typically es) if signer is enabled
region String false - AWS region (e.g., us-east-1) if signer is enabled
username String false - Username for HTTP basic authentication
password String false - Password for HTTP basic authentication
Kafka

Kafka

kafkaIntegration - is a command for Kafka integration.

<kafkaIntegration>
        <kafka alias="KAFKA_0" enabled="true" truncate="true">
            <bootstrapAddress>localhost:9092</bootstrapAddress>
            <autoOffsetReset>earliest</autoOffsetReset>
            <maxPollRecords>2</maxPollRecords>
            <maxPollIntervalMs>1000</maxPollIntervalMs>
            <clientId>123</clientId>
            <groupId>456</groupId>
            <autoCommitTimeout>50</autoCommitTimeout>
        </kafka>
</kafkaIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
bootstrapAddress String true - Comma-separated list of Kafka brokers (e.g., localhost:9092) for establishing initial connection
autoOffsetReset String false - Defines behavior when there is no initial offset or if the current offset doesn't exist. Typically earliest or latest
maxPollRecords Integer false - Maximum number of records returned in a single poll request
maxPollIntervalMs Integer false - Maximum delay (in milliseconds) between invocations of poll() when consuming messages
clientId String false - An ID string to pass to the server when making requests; used for logging and metrics
groupId String true - ID of the consumer group this client belongs to
autoCommitTimeout Integer false - Timeout (in milliseconds) for auto-committing Kafka offsets
Mongo

Mongo

mongoIntegration - is a command for Mongo integration.

<mongoIntegration>
        <mongo alias="MONGO_0" enabled="true" truncate="true">
            <database>mongo_db</database>
            <host>localhost</host>
            <port>27017</port>
            <username>username</username>
            <password>password</password>
        </mongo>
</mongoIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
database String true - Name of the MongoDB database to connect to
host String true - Host address where MongoDB server is running (e.g., localhost)
port Integer true - Port on which MongoDB server is listening (default is usually 27017)
username String true - Username for authenticating the MongoDB connection
password String true - Password for authenticating the MongoDB connection
MySQL

MySQL

mysqlIntegration - is a command for MySQL integration.

<mysqlIntegration>
        <mysql alias="MYSQL_0" enabled="true" truncate="true">
            <jdbcDriver>com.mysql.cj.jdbc.Driver</jdbcDriver>
            <username>playground</username>
            <password>playground</password>
            <connectionUrl>jdbc:mysql://localhost:3306/playground_db</connectionUrl>
            <schema>playground_db</schema>
            <hikari>
                <connectionTimeout>45000</connectionTimeout>
                <idleTimeout>60000</idleTimeout>
                <maxLifetime>180000</maxLifetime>
                <maximumPoolSize>50</maximumPoolSize>
                <minimumIdle>5</minimumIdle>
                <connectionInitSql>SELECT 1</connectionInitSql>
                <connectionTestQuery>SELECT 1</connectionTestQuery>
                <poolName>core-mysql-db-pool</poolName>
                <autoCommit>true</autoCommit>
            </hikari>
        </mysql>
</mysqlIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
jdbcDriver String true - Fully qualified name of the MySQL JDBC driver class
username String true - Username for connecting to the MySQL database
password String true - Password for connecting to the MySQL database
connectionUrl String true - JDBC connection URL to the MySQL database (includes host, port, and database name)
schema String true - Database schema name to use after connection
hikari.connectionTimeout Integer false - Maximum number of milliseconds to wait for a connection from the pool
hikari.idleTimeout Integer false - Maximum idle time for connections in the pool
hikari.maxLifetime Integer false - Maximum lifetime of a connection in the pool
hikari.maximumPoolSize Integer false - Maximum size of the connection pool
hikari.minimumIdle Integer false - Minimum number of idle connections maintained in the pool
hikari.connectionInitSql String false - SQL query executed when a new connection is created
hikari.connectionTestQuery String false - SQL query to validate connections from the pool
hikari.poolName String false - Custom name for the connection pool
hikari.autoCommit Boolean false - Whether to automatically commit database transactions
Oracle

Oracle

oracleIntegration - is a command for Oracle integration.

<oracleIntegration>
        <oracle alias="ORACLE_0" enabled="true" truncate="true">
            <jdbcDriver>oracle.jdbc.OracleDriver</jdbcDriver>
            <username>c##testlum</username>
            <password>password</password>
            <connectionUrl>jdbc:oracle:thin:@localhost:1521/xe</connectionUrl>
            <schema>C##TESTLUM</schema>
            <hikari>
                <connectionTimeout>45000</connectionTimeout>
                <idleTimeout>60000</idleTimeout>
                <maxLifetime>180000</maxLifetime>
                <maximumPoolSize>50</maximumPoolSize>
                <minimumIdle>5</minimumIdle>
                <connectionInitSql>SELECT 1 FROM dual</connectionInitSql>
                <connectionTestQuery>SELECT 1 FROM dual</connectionTestQuery>
                <poolName>core-oracle-db-pool</poolName>
                <autoCommit>true</autoCommit>
            </hikari>
        </oracle>
</oracleIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
jdbcDriver String true - Fully qualified name of the Oracle JDBC driver class
username String true - Username for connecting to the Oracle database
password String true - Password for connecting to the Oracle database
connectionUrl String true - JDBC connection URL to the Oracle database (includes host, port, and service name/SID)
schema String true - Database schema name to use after connection
hikari.connectionTimeout Integer false - Maximum number of milliseconds to wait for a connection from the pool
hikari.idleTimeout Integer false - Maximum idle time for connections in the pool
hikari.maxLifetime Integer false - Maximum lifetime of a connection in the pool
hikari.maximumPoolSize Integer false - Maximum size of the connection pool
hikari.minimumIdle Integer false - Minimum number of idle connections maintained in the pool
hikari.connectionInitSql String false - SQL query executed when a new connection is created (for Oracle typically SELECT 1 FROM dual)
hikari.connectionTestQuery String false - SQL query to validate connections from the pool (for Oracle typically SELECT 1 FROM dual)
hikari.poolName String false - Custom name for the connection pool
hikari.autoCommit Boolean false - Whether to automatically commit database transactions
PostgreSQL

PostgreSQL

postgresIntegration - is a command for PostgreSQL integration.

<postgresIntegration>
        <postgres alias="POSTGRES_0" enabled="true" truncate="true">
            <jdbcDriver>org.postgresql.Driver</jdbcDriver>
            <username>playground</username>
            <password>playground</password>
            <connectionUrl>jdbc:postgresql://localhost:5432/playground_db</connectionUrl>
            <schema>public</schema>
            <hikari>
                <connectionTimeout>45000</connectionTimeout>
                <idleTimeout>60000</idleTimeout>
                <maxLifetime>180000</maxLifetime>
                <maximumPoolSize>50</maximumPoolSize>
                <minimumIdle>5</minimumIdle>
                <connectionInitSql>SELECT 1</connectionInitSql>
                <connectionTestQuery>SELECT 1</connectionTestQuery>
                <poolName>core-postgres-db-pool</poolName>
                <autoCommit>true</autoCommit>
            </hikari>
        </postgres>
</postgresIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
jdbcDriver String true - Fully qualified name of the PostgreSQL JDBC driver class
username String true - Username for connecting to the PostgreSQL database
password String true - Password for connecting to the PostgreSQL database
connectionUrl String true - JDBC connection URL to the PostgreSQL database (includes host, port, and database name)
schema String true - Database schema name to use after connection (default usually public)
hikari.connectionTimeout Integer false - Maximum number of milliseconds to wait for a connection from the pool
hikari.idleTimeout Integer false - Maximum idle time for connections in the pool
hikari.maxLifetime Integer false - Maximum lifetime of a connection in the pool
hikari.maximumPoolSize Integer false - Maximum size of the connection pool
hikari.minimumIdle Integer false - Minimum number of idle connections maintained in the pool
hikari.connectionInitSql String false - SQL query executed when a new connection is created (e.g., SELECT 1)
hikari.connectionTestQuery String false - SQL query to validate connections from the pool (e.g., SELECT 1)
hikari.poolName String false - Custom name for the connection pool
hikari.autoCommit Boolean false - Whether to automatically commit database transactions
RabbitMQ

RabbitMQ

rabbitmqIntegration - is a command for RabbitMQ integration.

<rabbitmqIntegration>
        <rabbitmq alias="RABBIT_0" enabled="true" truncate="true">
            <host>localhost</host>
            <port>5672</port>
            <username>guest</username>
            <password>guest</password>
            <apiPort>15672</apiPort>
            <virtualHost>/</virtualHost>
            <enabledMetrics>true</enabledMetrics>
        </rabbitmq>
</rabbitmqIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
host String true - RabbitMQ server host address
port Integer true - Port number for AMQP protocol (default is usually 5672)
username String true - Username to authenticate with RabbitMQ
password String true - Password to authenticate with RabbitMQ
apiPort Integer false - Port number for RabbitMQ Management HTTP API (default is usually 15672)
virtualHost String false - Virtual host to connect to within RabbitMQ server
enabledMetrics Boolean false false Enable or disable collection of RabbitMQ metrics during test execution
Redis

Redis

redisIntegration - is a command for Redis integration.

<redisIntegration>
        <redis alias="REDIS_0" enabled="true" truncate="true">
            <host>localhost</host>
            <port>6379</port>
        </redis>
</redisIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
host String true - Redis server host address
port Integer true - Port number for Redis server (default is usually 6379)
S3

S3

s3Integration - is a command for S3 integration.

<s3Integration>
        <s3 alias="S3_0" enabled="true" truncate="true">
            <region>eu-central-1</region>
            <endpoint>http://localhost:4566</endpoint>
            <accessKeyId>DEFAULT_ACCESS_KEY</accessKeyId>
            <secretAccessKey>DEFAULT_SECRET_KEY</secretAccessKey>
        </s3>
</s3Integration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
region String true - AWS region where your S3 bucket or endpoint is located
endpoint String true - Custom S3 service endpoint URL (useful for local testing like with LocalStack)
accessKeyId String true - Access key ID for authenticating with the S3 service
secretAccessKey String true - Secret access key for authenticating with the S3 service
Sendgrid

Sendgrid

sendgridIntegration - is a command for Sendgrid integration.

<sendgridIntegration>
        <sendgrid alias="SG_0" enabled="true">
            <apiKey>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</apiKey>
        </sendgrid>
</sendgridIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
apiKey String true - API key used to authenticate with the SendGrid email service
SES

SES

sendgridIntegration - is a command for SES integration.

<sesIntegration>
        <ses alias="SES_0" enabled="true">
            <region>eu-central-1</region>
            <endpoint>http://localhost:4566</endpoint>
            <accessKeyId>DEFAULT_ACCESS_KEY</accessKeyId>
            <secretAccessKey>DEFAULT_SECRET_KEY</secretAccessKey>
        </ses>
</sesIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
region String true - AWS region where SES service is located
endpoint String false - Custom endpoint for connecting to SES (useful for local testing like with LocalStack)
accessKeyId String true - AWS Access Key ID for authentication
secretAccessKey String true - AWS Secret Access Key for authentication
SQS

SQS

sqsIntegration - is a command for SQS integration.

<sqsIntegration>
        <sqs alias="SQS_0" enabled="true" truncate="true">
            <region>eu-central-1</region>
            <endpoint>http://localhost:4566</endpoint>
            <accessKeyId>DEFAULT_ACCESS_KEY</accessKeyId>
            <secretAccessKey>DEFAULT_SECRET_KEY</secretAccessKey>
        </sqs>
</sqsIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
truncate Boolean true false Whether data will be cleared before each test run or not
region String true - AWS region where the SQS service is located
endpoint String false - Custom endpoint for connecting to SQS (useful for local testing like with LocalStack)
accessKeyId String true - AWS Access Key ID for authentication
secretAccessKey String true - AWS Secret Access Key for authentication
GraphQL

GraphQL

graphqlIntegration - is a command for GraphQL integration.

<graphqlIntegration>
        <api alias="MEGA_GQL_APP" url="http://localhost:8080/api/v1" enabled="true"/>
</graphqlIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
url String true - Base URL of the GraphQL API
AWS Lambda

Lambda

lambdaIntegration - is a command for Lambda integration.

<lambdaIntegration>
        <lambda alias="LAMBDA" enabled="false">
            <region>eu-central-1</region>
            <endpoint>http://localhost:4566</endpoint>
            <accessKeyId>DEFAULT_ACCESS_KEY</accessKeyId>
            <secretAccessKey>DEFAULT_SECRET</secretAccessKey>
        </lambda>
</lambdaIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
region String true - AWS region where the Lambda functions are deployed
endpoint String true - Custom endpoint URL for connecting to Lambda (useful for local testing like LocalStack)
accessKeyId String true - AWS access key ID for authentication
secretAccessKey String true - AWS secret access key for authentication
SMTP

SMTP

smtpIntegration - is a command for SMTP integration.

<smtpIntegration>
        <smtp alias="SMTP_0" enabled="true">
            <host>smtp.gmail.com</host>
            <port>587</port>
            <username>[email protected]</username>
            <password>uipryvqgcrtxkwbt</password>
            <smtpAuth>true</smtpAuth>
            <smtpStarttlsEnable>true</smtpStarttlsEnable>
        </smtp>
</smtpIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
host String true - SMTP server host (e.g., smtp.gmail.com)
port Integer true - Port for SMTP communication (usually 587 for secure communication)
username String true - SMTP server username (your email address)
password String true - SMTP server password or app-specific password
smtpAuth Boolean true true Whether to enable SMTP authentication
smtpStarttlsEnable Boolean true true Whether to enable STARTTLS for secure communication
Twilio

Twilio

twilioIntegration - is a command for Twilio integration.

<twilioIntegration>
        <twilio alias="TWILIO_0" enabled="true">
            <accountSid>AC947b2aede910ec0297c660222e264a29</accountSid>
            <authToken>2c3ece66799916a2b87ce289a2a9d067</authToken>
            <twilioNumber>+16203501340</twilioNumber>
        </twilio>
</twilioIntegration>

🧾 Attributes

Attribute Type Required Default Description
alias String true DEFAULT Unique alias, that you can come up with and use in your test scenarios
accountSid String true - Twilio Account SID used for authentication
authToken String true - Twilio Auth Token used for authentication
twilioNumber String true - Twilio phone number used for sending SMS or making calls
⚠️ **GitHub.com Fallback** ⚠️