Synchronizing application resources of a Kubernetes cluster service in HCL OneTest API

After you configure the physical connection to a Kubernetes cluster in HCL OneTest API, and when you want to test internal services in a Kubernetes cluster, you can synchronize the application resources of the internal service by using HCL OneTest API. You can also select the tests and stubs that are automatically created for the operations.

Before you begin

You must have completed the following tasks:
  • Verified that the service in a Kubernetes cluster that you want to use is running.
  • Configured the physical connection to the Kubernetes cluster in HCL OneTest API. See Configuring a physical connection to a Kubernetes cluster.
  • Noted the link to the application resource owned by the internal service in the Kubernetes cluster.
  • Opened your project in HCL OneTest API and the Physical View is displayed.

Procedure

  1. Open the Synchronization tab.
  2. Click Web in the toolbar, and then select the type of resource that the application uses.

    For example, if the application uses the OpenAPI 3.0 definition, then select the OpenAPI 3.0 Definition option as the resource type.

    The Create a new Synchronization Source dialog is displayed.

  3. Complete the following steps in the Create a new Synchronization Source dialog:
    1. Enter the URL to the application resource owned by the service in the Kubernetes cluster in the Location field.

      You can use the service name and service port or the pod name and the pod port in the path to the application resource. For example, the URL to the application resource can be as follows: https://<service_name>:<service_port>/<application_name>/<application_resource>

    2. Click Browse, and then select the Kubernetes cluster that you added as the physical resource in the Cluster field.
    3. Click Finish.

      The application resource of the service is synchronized. The logical and physical entities created in HCL OneTest API are displayed.

Results

You synchronized the application resource of the service in a Kubernetes cluster in HCL OneTest API. The tests and stubs are also created during the synchronization.

What to do next

You can now run the tests and stubs that are created to test the internal service of a Kubernetes cluster in HCL OneTest API. See Running tests and stubs.