Skip to main content

Database

EchoAPI allows developers to connect to databases, enabling the retrieval of parameters and performing assertion checks during interface debugging.

EchoAPI supports connecting to 8 types of databases, including Mysql, SQL Sever, Oracle, Clickhouse, DmDB, PostgreSQL, Redis, and MongoDB.

Currently, EchoAPI supports database operations in Api debugging, interface test cases, pre-execution of automated tests, and post-execution scripts.

info

If you have completed the database configuration, click here to see how to use the database.

Configure Database

image.png

image.png

caution

If you need to configure different database connections for various environments, you can switch environments and configure each database connection independently. This ensures that when you switch environments, EchoAPI connects to the corresponding databases.

image.png

image.png

Oracle Database Connection

tip

On macOS systems, Oracle database connections are not supported on M1 and M2 chips due to a lack of driver support.

To connect to an Oracle database, you need to download and install the Oracle Instant Client. Please install version 19. Download link: https://www.oracle.com/database/technologies/instant-client/downloads.html

Installation Instructions

Windows System

Download the corresponding Windows version of the Instant Client package. All installations require the Basic or Basic Light package.

image.png Unzip these packages into a directory, such as C:\oracle\instantclient_19_3.

Add this directory to the PATH environment variable. If you have multiple versions of Oracle libraries installed, make sure the new directory is at the front of the path. Reference document: https://www.java.com/en/download/help/path.html.

Alternatively, the Oracle client configuration files can be placed in another accessible directory. Then, set the TNS_ADMIN environment variable to that directory name.

Restart the EchoAPI app

macOS System

Download the corresponding macOS version of the Instant Client ZIP file, such as instantclient-basic-macos.x64-19.8.0.0.0dbru.zip.

Unzip the ZIP file to a specified directory, such as: ~/oracle/instantclient_19_8/.

Run the following command to create a symbolic link for the libclntsh.dylib file in the specified directory to /usr/local/lib:

ln -s ~/oracle/instantclient_19_8/libclntsh.dylib /usr/local/lib

Restart EchoAPI App.

Refer to the official documentation for more information.

Linux System

Refer to the instructions in the official documentation: https://www.oracle.com/database/technologies/instant-client/downloads.html