Cannot change the proxy settings in the client application when Proxy Pass thru style is required

Document ID : KB000122484
Last Modified Date : 06/12/2018
Show Technical Document Details
Issue:
To reach a specific endpoint we now need to set DevTest Workstation to use our internal proxy. 
We are using DevTest 10.2 and we need to select the Proxy pass thru style. Not Gateway.
With the Proxy mode we would need to change the proxy settings in the client application sending the requests. However, this is not possible on our environment.
 
Environment:
DevTest on releases 10.1 and 10.2.
Cause:
When the DevTest needs to go through a proxy to reach a specific endpoint the following properties need to be set in the local.properties file:
lisa.http.webProxy.host=<Proxy Server>
lisa.http.webProxy.port=<Port>

lisa.http.webProxy.ssl.host=<Proxy Server>
lisa.http.webProxy.ssl.port=<Port>

In the VSE Recorder, prior 10.3 releases, we would need to use the Proxy mode to reach the endpoint and capture the transactions.
In this case, we would need to change the proxy settings in the client application to point to the VSE Recorder.
Resolution:
Since changing the proxy settings in the client application can be a challenge on the environment, you can use one of the alternates methods to create the virtual service.

1. If you are able to capture the traffic using Wireshark or tcpdump, you can create a pcap file and create a service image from pcap file.
Here is more information on how to Create a Service Image from PCAP file: https://docops.ca.com/devtest-solutions/10-2/en/using/using-ca-service-virtualization/using-devtest-workstation-with-ca-service-virtualization/creating-service-images/create-a-service-image-from-pcap

2. If you have the request and response pairs, you can try to create a Virtual Service from RR Pairs.
More information on how to Create a Service Image from Request and Response Pairs: https://docops.ca.com/devtest-solutions/10-2/en/using/using-ca-service-virtualization/using-devtest-workstation-with-ca-service-virtualization/creating-service-images/create-a-service-image-from-request-response-pairs

3. You can also create a sample Virtual Service and deploy it to the VSE Server, make sure the Live Invocation step is correctly pointing to the live endpoint.
Once the service model is running in the VSE, change the execution mode to Learning.
Set the client application to send the requests to the VSM running on the VSE Server.
In Learning mode, the requests will be forwarded to the live endpoint and the VSM will learn the new transactions that were not recorded in the Service Image.
If the VSE server also needs to know about the proxy information, the local.properties in the VSE server needs to be updated with the proxy settings mentioned above.
You can find more information regarding the Learning execution mode - https://docops.ca.com/devtest-solutions/10-2/en/using/using-ca-service-virtualization/using-devtest-portal-with-ca-service-virtualization/monitor-virtual-services/execution-mode

4. Starting with DevTest 10.3, it was added support for web proxy in gateway recorder - https://docops.ca.com/devtest-solutions/10-3/en/release-notes/new-features-and-enhancements#NewFeaturesandEnhancements-SupportProxyserversforrecordinginGatewaymode-RecordingMode
With that, there is no need to change the proxy settings in the client application to point to the VSE Recorder. The client application can send the request to the Recorder as it works in Gateway mode.
 
Additional Information: