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
- Installed the latest version of the HCL Launch server and agent on the target system.
- Configured the agent and verified that the agent is running on the target system. For information about how to configure the agent, refer to Configure the agent and target system.
- Downloaded the latest version of the HCL OneTest Data Launch Plugin from the HCL License & Delivery portal.
- Installed the HCL OneTest Data Launch Plugin on the HCL Launch server. See Installing the HCL OneTest Data Launch Plugin.
- Created an account on the HCL Launch server.
- Logged in to HCL OneTest™ Server.
- Created a project and a schema in HCL OneTest™ Data.
- Established a connection between HCL OneTest™ Data and a supported database. See
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
- Log in to the HCL Launch server.
- Create a component.
- 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 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
- You can find the output file in the HCL OneTest™ Data pod at the following
location:
- Create a resource and select the agent.
- Add the component that you created to the agent.
- Create an application.
- Create an environment from the Applications dashboard.
- Add the resource and the component that you created to the environment.
- Create a process for the application by clicking the
Processes tab from the
Applications dashboard.
The page of the application process is displayed.
- 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.
- Click Save.
- Go to the Applications dashboard, and then click Request Process for the environment of the application process that you want to execute.
- Select the name of the application, environment, and process from the drop-down list, and then click Next.
- Verify that the default settings of the component versions are retained, and then click Next.
- Toggle the Run Now switch to the on position to set the Schedule Deployment, and then click Next.
- 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.
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
- 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.