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.
Introduction
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.
- 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
- Creating stubs in HCL OneTest™ API for an Istio service. See Tasks for creating stubs for an Istio service.
- Publishing stubs to Istio. See Tasks for publishing stubs to Istio.
- Running stubs on Istio. See Tasks for running stubs in Istio.
- Recording HTTP traffic on Istio, and then creating stubs from recorded events. See Recording HTTP traffic in Istio.
Task | More information | |
---|---|---|
1. |
You must create a logical HTTP connection in the Architectural School perspective for the HTTP transport. |
|
2. |
You must create an HTTP transport for the HTTP logical connection. |
|
3. |
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. |
|
4. |
You must set up an Operation that uses a Web Server as the physical resource for the HTTP transport before you can create stubs. |
|
5. |
You can specify the stubbing settings based on the message exchange pattern (MEP) for the HTTP transport. |
|
6. |
You must create stubs by using MEP. |
|
7. |
You can publish the stubs that you create. |
Task | More information | |
---|---|---|
1. |
Publish one or more stubs to Istio by using any of the
following methods:
|
|
2. |
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 |
3. |
Verify that the stub is published by checking the output directory from the publish step. |
Task | More information | |
---|---|---|
1. |
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. |
|
2. |
View Kubernetes deployment information. |
|
3. |
Stop a stub or delete the deployment of the stub in Istio. |