Database connection test step

The database connection test step connects to a database server using the given host, port, user, password and database. The supported database servers are MySQL, PostgreSQL, Microsoft SQL and Oracle. The step fails if the connection fails.

An optional SQL statement can be given that will be executed on the database server after a successful connection. The step fails if the execution of the statement fails. In the case of successful statement execution, the execution result is saved in CSV format as the result of the test step and can be viewed using the Wenenu UI or accessed using the Wenenu API. The maximum length of the CSV is 524288 characters. The output is truncated if it exceeds the maximum length.

Warning For security reasons, do not display any sensitive information in the step result.

UI settings

Database connection step UI settings
Figure 1. Database connection step UI settings

1

Arbitrary name of the test step up to 64 characters

2

Test agent that is going to execute the test step

3

Type of the database server

4

Host of the database server

5

Port of the database server

6

(Optional) Name of the database to connect to

7

Username that is used for the connection

8

Password that is used for the connection

9

(Optional) SQL statement that is executed on the database server

JSON

{
  "displayName": "Database test", 1
  "type": "db", 2
  "id": "b24b8ef5-54f8-4a98-bb69-1de83b873691", 3
  "serverType": "mysql", 4
  "host": "db2.example.com", 5
  "port": 3306, 6
  "dbName": "sales", 7
  "dbUser": "testuser", 8
  "dbPassword": "testpassword", 9
  "sql": "SELECT date FROM invoice ORDER BY id DESC;", 10
  "agent": { 11
    "type": "standard",
    "id": "162dff466f92c372005cf7055d006b77ac377e01c60ae59f942d74680f2496d1"
  }
}
1 Arbitrary name of the test step up to 64 characters
2 Type of the test step, must be 'db'
3 Version 4 unique identifier of the test step, must be unique within the test scenario
4 Type of the database server
5 Host of the database server
6 Port of the database server
7 Name of the database to connect to
8 Username that is used for the connection
9 Password that is used for the connection
10 SQL statement that is executed on the database server
11 Agent object defining the agent that will execute the test step