When installing a database driver, you need to specify a custom string template. ReadyAPI uses this template to provide an easier way to configure a JDBC connection.
Notes
-
To learn how to build the needed connection string, see the documentation of the database and of the JDBC driver you use.
-
As of Java 17.0.3 and from adopting 17.0.4 in ReadyAPI 3.41.0, the '_' characters are no longer allowed in JDBC connection strings.
-
If your existing tests have the '_' in their JDBC connection string, please add and use this JVM option: Dcom.sun.jndi.ldapURLParsing="legacy"
-
A connection string template is a regular connection string in which you replace some values with placeholders. ReadyAPI provides you with text fields you can use instead of placeholders when configuring a JDBC connection. You specify the needed values in these fields, and ReadyAPI uses these values instead of placeholders. This allows you to specify one connection string template for many JDBC connections:
To specify a placeholder, use the following template:
The following table lists the available placeholders:
Placeholder | Description |
---|---|
HOST |
Corresponds to the Host field. |
PORT |
Corresponds to the Port field. If you use the PORT placeholder, you must specify a default value. |
USER |
Corresponds to the User field. |
PASSWORD |
Corresponds to the Password field. |
DB |
Corresponds to the Database field. |
SID |
Corresponds to the Sid field. |
SERVER_NAME |
Corresponds to the Server name field. |
ODBC_DSN_NAME |
Corresponds to the Odbc dsn field. |
If the needed placeholder is not listed in the table, you need to specify the needed value in the template.
Example
A connection string template for the Microsoft SQL Server database may look like the following:
<HOST>
, <PORT:1433>
and <DB>
are placeholders. When you are configuring a specific JDBC connection, you specify the desired value for each parameter. The final connection string may look like the following:
See Also
Preconfigured JDBC Drivers
Database Manager
Installing Database Drivers
Working With Database Drivers