Configuring the physical database resource

After you create a physical database, you can configure the details of the physical database.

Procedure

  1. Open the Physical View of HCL OneTest API Architecture School perspective.
  2. Double-click the database to configure.

    The Database dialog is displayed.

  3. Configure the Connection details for different fields as listed in the following table:
    Table 1. Fields for database connection details
    Field Description
    Maximum Number of Connections Enter the maximum number of database connections from HCL OneTest API that are to be available in the pool. If you leave this field blank, the value defaults to 1.
    Tip: You must increase the value if you run multiple tests that use the same database resource concurrently.
    Driver
    Select the database driver for the specified database type from the drop-down list or enter the driver class name if the database driver is not listed.
    Note: Drivers that are installed and added through the Library Manager are displayed, and are prefixed with User Defined followed by the name of the driver in parenthesis. For example, User Defined (<name of the driver>).
    Database URL Enter the connection URL for the database, or modify the default URL after you select one of the included drivers. For more information about the specification of database URLs when using IP literal addresses, see the related links.
    The following table lists the connection URL patterns that are supported by HCL OneTest API:
    Table 2. Supported URL patterns
    Database driver URL pattern
    IBM® Db2® Universal jdbc:db2://hostName:port/databaseName
    IBM® Db2® Alias jdbc:db2:db_alias
    IBM® Db2® iSeries jdbc:as400://hostName/defaultSchema
    Derby jdbc:derby://hostName:port/databaseName
    Composite Software JDBC jdbc:compositesw:dbapi@hostName:port?domain=composite&dataSource=system&registerOutputCursors=true
    Microsoft SQL Server jdbc:sqlserver://hostName:port;databasename=databaseName
    Microsoft SQL Server jdbc:jtds:sqlserver://hostName:port/databaseName
    MySQL Connector/J jdbc:mysql://hostName:port/databaseName
    Oracle jdbc:oracle:thin:@hostName:port:sid
    Oracle jdbc:oracle:thin:@//hostName:port/sid
    Oracle jdbc:oracle:thin:@ldap(s)://hostName:port/[dn][attributes][scope][filter][extensions]
    Oracle jdbc:oracle:thin:@connectionDescriptor
    Example connection descriptor:
    (DESCRIPTION=           
        (LOAD_BALANCE=on)
        (ADDRESS_LIST=           
        (ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521))           
        (ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521)))           
        (CONNECT_DATA=(SERVICE_NAME=service_name)))
    PostgreSQL jdbc:postgresql://hostName:port/databaseName
    SQL Lite jdbc:sqlite:databaseName
    Sybase jTDS jdbc:jtds:sybase://hostName:port/databaseName
    Sybase jConnect jdbc:sybase:Tds:hostName:port/databaseName
    Username/Password Enter a valid user name and password combination to send when you are connecting to the database. Both fields support tags, but the menu is not supported in the Password field.
    Database Schema Enter the name of the database schema to switch to when a connection is established. This field is optional and you can use it to access database tables outside of your default database schema.
    Note: To access the database schema, you might need to grant the user access to that schema. For example, GRANT access value ON SCHEMA schema name to USER user name.
  4. Click Test Connection to verify the connection details.
  5. Configure the schemas and stored procedure filters, under Advanced tab, as follows:
    Table 3. Fields in the Advanced tab - Enable Stored Procedure Retrieval
    Field Description
    Schema Enter the name of a schema to limit retrieval to that schema (available only if the next option is disabled).
    Use Connection Username Enable this option to retrieve procedures only from the schema defined by the user (based on the user name or password supplied under the Settings tab).
    Catalog/Package Enter a catalog or package name to limit retrieval to only the procedures that are contained by the catalog or package.
    Procedure Enter a procedure name to retrieve only that specific procedure.
  6. Configure timestamp formatting, under Advanced tab, as follows:
    Table 4. Fields in the Advanced tab - Enable Timestamp formatting
    Field Description
    Precision Override the default value of timestamp values. The default value for the fractional second precision is 9.
    Format zero Enable this option to add trailing zeros to match the selected precision when there are no fractional seconds.