Generating the test data by using HCL Launch

When you perform a test while you deploy an application on HCL Launch, you might want to generate test data. You can generate a random test data to test your application by integrating HCL OneTest Data Launch Plugin with HCL® OneTest Data.

Before you begin

You must have completed the following tasks:

About this task

You can write the test data generated by integrating HCL OneTest Data Launch Plugin with HCL® OneTest Data into a file or any supported database. After integration with HCL OneTest Data Launch Plugin, HCL® OneTest Data supports the insertion of the generated test data in both JDBC supported database and MongoDB. To write the generated test data in the database, you must establish a connection between HCL® OneTest Data and the supported database.

Procedure

  1. Log in to the HCL Launch server.
  2. Create a component.
  3. Create a component process, and then set the properties for the component by referring to the following table:
    Field Action Required/Optional
    Name Enter a name for the HCL Launch application process. Required
    Server URL Enter the URL of HCL OneTest Server.

    The format for the URL is as follows: https://<fully-qualified-dns-name>/

    Required
    Custom Trust Store Path Enter the path of the custom trust store where the certificate is stored.
    Note: If you do not find details of the custom trust store in the application plugin, then the application navigates to the default trust store to access the certificate.

    The default trust store is at the following location: $JAVA_HOME/jre/lib/security/cacerts

    Optional
    Custom Trust Store Password Enter the password to access the custom trust store. Optional
    Offline Token Enter the offline token that is generated in HCL OneTest Server. Required
    Project Enter the name of your project. Required
    Schema Enter the name of the schema associated with the project you selected. Required
    Root Element Specify the root path of the element for which you want to generate the test data.

    For example, Root:NewType1

    Required
    Number of Records Enter the number of records you want to generate. Required
    Numeric Seed Value Enter the seed value that acts as an instance of random data when you generate the test data. Optional
    Data Storage

    Select the data storage type. The data storage is a location where you want the generated test data to be written.

    You can select FILE, JDBC, or MONGODB as a data storage type.

    FILE: The generated test data is written into a file and you can download it in your local file system.

    JDBC: The generated test data is written in the selected JDBC supported database.

    MONGODB: The generated test data is written into MongoDB.

    Required
    Connection Name
    Note: This field is applicable only when you select JDBC or MONGODB as the data storage type.

    Enter the name of the JDBC or MONGODB connection.

    Required
    Output Format Specify the file format of the generated test data. Required
    Data File Location Specify the location for the output file. If the specified location is invalid, by default, the output file is saved in the HCL® OneTest Data server.
    Notes:
    • You can find the output file in the HCL® OneTest Data pod at the following location:

      /opt/hcl/hip-rest/output/<accountId>/<userID>/<projectId>/<schemaId>/<genMapPath>

    • This field is not applicable if you select the data storage type as JDBC or MongoDB.
    Optional
    Note: You can ignore the following property fields while you set up the integration of HCL Launch with HCL® OneTest Data:
    • Working Directory
    • Post Processing Script
    • Precondition
    • Use Impersonation
  4. Create a resource and select the agent.
  5. Add the component that you created to the agent.
  6. Create an application.
  7. Create an environment from the Applications dashboard.
  8. Add the resource and the component that you created to the environment.
  9. Create a process for the application by clicking the Processes tab from the Applications dashboard.

    The page of the application process is displayed.

  10. Click the component process that you created in step 3 from the Component Process Steps on the left navigation pane and drag it into the design area.
  11. Click Save.
  12. Go to the Applications dashboard, and then click Request Process for the environment of the application process that you want to execute.
  13. Select the name of the application, environment, and process from the drop-down list, and then click Next.
  14. Verify that the default settings of the component versions are retained, and then click Next.
  15. Toggle the Run Now switch to the on position to set the Schedule Deployment, and then click Next.
  16. Check the deployment details, and then click Submit Deployment.

Result

You have successfully generated the test data by using the HCL OneTest Data Launch Plugin for HCL® OneTest Data.

You can view the completed request process with the status displayed as Success or Failed.
Note:

If the test data generation request fails, you can view the logs of the process. See Viewing the HCL Launch logs.

What to do next

After the successful completion of the process, you can perform the following tasks:
  • If you selected FILE as a data storage type, then you can download the generated test data in the local file system at the specified location.
  • If you selected JDBC as the data storage type, then you can use the generated test data from the database.
  • If you selected MONGODB as the data storage type, then you can use the generated test data from the database.