Recording Ingress requests
You can in combination with HCL OneTest™ Server, which is installed with the demo configuration, record Ingress requests that are sent by services outside of the cluster hosting the Bookinfo application.
Before you begin
- Installed HCL OneTest™ Server with the demo configuration. Refer to the Installation of HCL OneTest™ Server topics in the Server documentation.
- Installed the sample Bookinfo application into a namespace called bookinfo in the same Kubernetes cluster as HCL OneTest™ Server. Note: The Bookinfo application in this example task uses a gateway URL as http://www.rtas-bookinfo.com.
- Created a Kubernetes rolebinding between the cluster role rockstar-execution-istio-test-system and the HCL OneTest™ Server execution service account test-system:rockstar-execution. This rolebinding allows HCL OneTest™ Server to manage the required Kubernetes resources in the bookinfo namespace so that the HTTP traffic going through Istio can be recorded.
- Configured your user offline token that you generated on HCL OneTest™ Server in the Server Settings tab in HCL OneTest™ API so that HCL OneTest™ API can access HCL OneTest™ Server. See Accessing HCL OneTest Server.
About this task
The productpage microservice of the Bookinfo application handles requests that arrive from a browser outside the cluster, unlike requests going to the reviews service which are produced from the productpage microservice (service to service). To record requests that arrive from outside the cluster we must use the externally accessible gateway URL. In this example, we use http://www.rtas-bookinfo.com/productpage.
Procedure
-
Create an HTTP Connection in the Logical View.
You must enter bookinfoApp in the name field. A logical HTTP Connection resource is created and a physical Web Server resource also called bookinfoApp is created and bound together in the current environment.
-
Open the physical Web Server resource by right clicking the logical HTTP Connection, and then selecting Physical Resource.
The Web Server dialog is displayed.
- Enter the externally accessible hostname of the productpage service as www.rtas-bookinfo.com in the Host field.
- Enter 80 as the gateway port in the Port field.
- Click Test Transport to verify if the access through the Ingress gateway is enabled.
-
Click the Recording tab, and select the Istio option.
HCL OneTest™ API instructs the recording studio to use Istio when recording this transport. The transport is now ready to be used to record the HTTP requests and responses going to the productpage service of the BookInfo application.
- Switch to the Logical View perspective, and then create a service component called bookinfoApp.
- Create an operation with the name GET /productpage under the service component.
- Open the operation, go to the Message Exchange Pattern tab, and then click Browse.
- Select the bookinfoApp as the transport.
- Enter the path used by the application as /productpage in the Resource Path field.
- Change the HTTP method to GET, and then click OK.
-
Switch to the Recording Studio perspective, and then click the Add monitor button.
The resource selector dialog is displayed.
- Select the GET /productpage operation.
- Start recording by clicking the Record button.
- Open a browser and open the URL http://www.rtas-bookinfo.com/productpage.
Results
You can view a request and response in the Recording Studio.