Browsermob Proxy and Selenium Grid
Browsermob Proxy is an open source proxy that can be used with our Gridlastic Connect tunnel client to tunnel traffic to test your internal behind firewall web servers. Browsermob proxy should be used when there is a specific need like for performance testing as it has built in support for producing performance data. Otherwise our recommendation for tunneling via a proxy is to use the open source proxy Squid.
BROWSERMOB PROXY INTEGRATION
To tunnel your selenium grid nodes through your own Browsermob Proxy, follow the setup below.
Click chart to enlarge.
Sample Gridlastic Connect Config file:
Start the tunnel client like
./gridc -username=HUB_USERNAME --password=HUB_PASSWORD -config=config.cfg start BMP-PROXY-1 BMP-PROXY-2 BMP-PROXY-3
the output would be:
Tunnel Status online
Forwarding tcp://your_subdomain.gridlastic.com:7001 -> 127.0.0.1:9091
Forwarding tcp://your_subdomain.gridlastic.com:7002 -> 127.0.0.1:9092
Forwarding tcp://your_subdomain.gridlastic.com:7003 -> 127.0.0.1:9093
Of course you need to create the equivalent browsermob proxies on ports 9091, 9092 and 9093 see (browsermob proxy example
for instructions how to do this) but your tunnel client and its mapping is independent from this and you can start tunnels to non yet created Browsermob proxies. This enables you to configure Browsermob proxies whenever you want and route one or many selenium tests through one proxy or many proxies.
Each Browsermob proxy can create a HAR file with performance data that you can use in your test suite to include performance testing at the same time you run functional testing.
The above endpoints like "your_subdomain.gridlastic.com:7001" are accessible only by your Gridlastic selenium grid nodes. Use these endpoints in your selenium test suite as selenium proxies, see the Squid example