Establishing a JDBC connection with HCL OneTest Data

You must establish a connection between HCL OneTest Data and the JDBC supported database to generate the schema and to write the generated test data in the database.

Before you begin

You must have created a sample schema in the database. See Creating a sample schema in a database.

Procedure

  1. Select your project in HCL OneTest Server and go to the Data Fabrication page.
  2. Click New from the Connections tab to create a new connection.
  3. Select JDBC as a connection type and click Next.
  4. Enter the following properties of the connection in the Properties dialog box.
    1. Enter the URL of the database.
      You must provide the URL in the following format:jdbc:<DatabaseType>://<HostName/IPAddress>:<PortNumber>/<CustomSettings>
      Note: You must provide the database name in <CustomSettings> for establishing connection with IBM DB2 database.
      For example,
      • MySQL Server - jdbc:mysql://10.0.2.15:8081
      • Microsoft SQL Server - jdbc:sqlserver://10.134.59.16:1433
      • IBM DB2 - jdbc:db2://10.134.59.16:50000/testdb
    2. Enter the name and password to access the database.
  5. Click Test to verify whether the connection is established successfully.
    Note: If the connection fails to establish, it can be because of one of the following reasons:
    • Mismatch in the version of the drivers.
    • Unreachable database.
    • Missing database.
    • Unsuccessful copying of the connector jar file.

Results

You have successfully established the connection between HCL OneTest Data and the database.

What to do next

You must provide a name for the connection, and then generate a schema. See Generating a schema in HCL OneTest Data.