ATS : Trace HTTP communication by using a proxy

Introduction

Here we describe how to inspect your HTTP(S) requests and responses independently of your test code.

This is useful when you don't want to change your code in order to set verbose mode of ATS HTTP/REST clients.

 


Setting proxy on JVM

Test execution is done in some JVM so you may use these generic properties from command line to turn proxy usage.

These are the related Java system properties which should be used in order to turn on proxy usage:

  • http.proxyHost: the host name (name or IP) of the proxy server
  • http.proxyPort: the port number, the default value being 80.
  • http.nonProxyHosts: a list of hosts that should be reached directly, bypassing the proxy. This is a list of patterns separated by '|'. The patterns may start or end with a '*' for wildcards. Any host matching one of these patterns will be reached through a direct connection instead of through a proxy.
  • htttps.proxyHost: HTTPS proxy host name to use
  • https.proxyPort: HTTPS port

Details: https://docs.oracle.com/javase/7/docs/technotes/guides/net/proxies.html

 


Use Fiddler as a proxy

You can also use Fiddler (https://www.telerik.com/fiddler). It is a free Windows proxy to set and inspect HTTP(S) traffic for debugging purposes.
(warning) Note that 2.x versions do not support TLS v1.1 and v1.2 protocols because .NET 2 do not support them. Details are here

You have to set:

  • Fiddler Options -> Connections -> Fiddler listens on port . Default port used is 8888. You may change it on this tab.
  • Fiddler Options -> HTTPS -> Decrypt HTTPS traffic. This involves using Fiddler own certificate, that's why you may see errors and your client temporarily should not reject such certificates. Details are here

 


Go to parent page

Go to Table of Contents