Creating a sample schema in a database

To generate a schema in HCL OneTest Data, you must create a schema with a table in the database.

Procedure

  1. Download the JDBC connector jar file to your local file system.
  2. Copy the connector jar file from your local file system to the HIP REST and HIP Server pod by using the following commands from the command prompt.

    For example, run the following commands if you are using the MySQL database:

    For HIP REST pod

    kubectl cp /<source path/mysql-connector-java-8.0.19.jar rockstar-hip-rest-5d4d6b6d66-kbj5l:/opt/runtime/extra/mysql-connector-java-8.0.19.jar

    For HIP Server pod

    kubectl cp /source path/mysql-connector-java-8.0.19.jar rockstar-hip-server-0:/opt/hcl/hip/extjar/mysql-connector-java-8.0.19.jar

    Notes:
    • Depending on the database you use, you might have to modify the commands for the database.
    • When you install or restore HCL OneTest Data, you must copy the connector jar file again.
  3. Create a schema with a table in the database by using the following commands from the command prompt.
    For example, if you want to use the MySQL database, you can use the following command in the MySQL Workbench to create a schema with a table:
    create schema <schema_name>;
    use <schema_name>;
        CREATE TABLE IF NOT EXISTS <table_name> (
        task_id INT PRIMARY KEY,
        title VARCHAR(255) NOT NULL,
        description TEXT
    );
    
    This command creates a schema in the MySQL database.
    Remember: In HCL OneTest Data, you must refer to the schema name and the table name that you created by using this command.

Results

You have successfully created a sample schema in the database.

What to do next

After you create a schema in the database, you must establish the connection between HCL OneTest Data and the JDBC supported database. See Establishing a JDBC connection with HCL OneTest Data

Note: You can view the schema name that you created in the database as the value of the Catalog property in HCL OneTest Data.