Testing with Istio

When you have applications hosted in a Kubernetes cluster that have Istio as a service mesh, you can virtualize the services in the cluster by creating stubs and tests for testing with Istio in HCL OneTest API.


Istio is an open-source service mesh that layers transparently onto existing distributed applications. Istio lets you connect, secure, control, and observe services deployed on cloud platforms.

Prerequisite for testing with Istio

You must have completed the setting up of the Istio control plane on Kubernetes in your IT infrastructure. For more information, refer to the Istio documentation.

About testing with Istio

For testing with Istio, you must set up a Kubernetes with Istio cluster, and then you can create and publish stubs from HCL OneTest API so that stubs can be run within Kubernetes. The stubs published can be co-located with existing services running within the Kubernetes cluster.

You can create stubs for the following types of requests received or sent by the Istio service mesh:
  • Requests received by services in the Istio service mesh.
  • Requests sent from namespaces in the Istio service mesh to external services that are not in the Istio service mesh.

Tasks for testing with Istio

You can find information about the tasks that you can perform in HCL OneTest API for testing with Istio after you have set up Istio in a Kubernetes cluster:
Table 1. Tasks for creating stubs for an Istio service
Task More information


You must create a logical HTTP connection in the Architectural School perspective for the HTTP transport.

Creating logical HTTP connections


You must create an HTTP transport for the HTTP logical connection.

Creating physical web server resources


You must set up a Service Component that uses a Web Server as the physical resource for the HTTP transport before you can create stubs.

Creating a service component


You must set up an Operation that uses a Web Server as the physical resource for the HTTP transport before you can create stubs.

Creating an operation


You can specify the stubbing settings based on the message exchange pattern (MEP) for the HTTP transport.

Stubbing settings for Istio stubs


You must create stubs by using MEP.

Creating a stub by using MEP


You can publish the stubs that you create.

Publishing and running stubs

Table 2. Tasks for publishing stubs to Istio
Task More information


Publish one or more stubs to Istio by using any of the following methods:
  • User interface
  • Command line
  • Ant task


Check whether the stub that you want to publish is based on a transport that is supported.

Supported transports to publish stubs to Istio or Kubernetes


Verify that the stub is published by checking the output directory from the publish step.

Verifying stub publication in Istio or Kubernetes

Table 3. Tasks for running stubs in Istio
Task More information


Run stubs in Istio on any Kubernetes cluster.

Note: You cannot run the stubs on HCL OneTest API.
You can add the stubs to a project on HCL OneTest Server, and then run the stubs from the Execution page. Refer to the HCL OneTest Server documentation.

Running stubs in Istio or Kubernetes


View Kubernetes deployment information.

Getting stub information in Kubernetes deployments


Stop a stub or delete the deployment of the stub in Istio.

Stopping stubs that are running in Istio or Kubernetes