Testing internal services in Kubernetes

After you set up a Kubernetes cluster, you can use HCL OneTest API to test internal services in Kubernetes that are not exposed through an ingress gateway to external clients.

When you set up a Kubernetes cluster that runs various services, you can use HCL OneTest API to create tests or stubs to test the applications or service endpoints owned by the Kubernetes services. HCL OneTest API supports testing of the applications that use HTTP or HTTPS transports for communication.

Prerequisites

You must have completed the setting up of the latest version of a Kubernetes cluster in your IT infrastructure and ensured that various services run in the Kubernetes cluster.

You must have a suitable kubeconfig file with access to the Kubernetes cluster in a folder on the computer on which you installed HCL OneTest API. The kubeconfig file must contain the following details:
  • The name of the service that you want to test.
  • The cluster IP address of the service and the port that the service uses in the cluster.
  • The namespace that contains the service.
    Note: If you do not provide a namespace, HCL OneTest API considers the default value of the namespace as default.
  • The certificate details of the Kubernetes cluster that are required to authenticate the connection requests from HCL OneTest API.

Task flow for testing internal services in Kubernetes

You can find information about the tasks that you can follow to test the internal services in Kubernetes.

Task Go to...
Configure the Kubernetes cluster as a physical resource to connect from HCL OneTest API in the Physical View tab of the Architectural perspective. Configuring a physical connection to a Kubernetes cluster
Synchronize the application resources owned by an internal service of a Kubernetes cluster. Synchronizing application resources of a Kubernetes cluster service in HCL OneTest API
Run the tests and stubs created by using the synchronization feature in HCL OneTest API. Running tests and stubs