How to Access Internal URLs in On-Prem TestGrid Deployments

Modified on Mon, Jun 15 at 3:39 PM

Overview

This guide explains the available methods for accessing local or internal URLs from TestGrid devices in an on-premise deployment environment.


Prerequisites

Before accessing internal URLs, ensure the following:

  • The TestGrid server and devices have network connectivity.

  • The internal URL is accessible from the TestGrid network.

  • Administrative access is available to modify network settings, firewall rules, or proxy configurations if required.


Steps

Method 1: Configure Network Settings

Connect the devices to a network that has access to the internal URL.

Options

  • Use a VPN to connect the device to the internal network.

  • Set up a proxy server that routes traffic to the internal URL.

  • Modify DNS settings to resolve the internal domain correctly.

Caption: Configure network access to internal URLs


Method 2: Modify Hosts File (For Rooted Android/Jailbroken iOS Devices)

If the device allows root access:

  1. Modify the /etc/hosts file to point the internal URL to its IP address.

Example:

echo "192.168.1.10 internal.example.com" >> /etc/hosts

Caption: Update hosts file with internal URL mapping

  1. Restart the browser or application to apply the changes.

Caption: Restart browser after hosts file update


Method 3: Use Local Tunnel (ngrok, SSH Tunnel, Cloudflare Tunnel)

ngrok

  1. Install ngrok.

Caption: Install ngrok

  1. Expose the internal service using the following command:

ngrok http 8080

Caption: Start ngrok tunnel

  1. Use the generated public URL to access the internal service.

Caption: Access internal service using generated URL

Cloudflare Tunnel

  1. Configure a tunnel using cloudflared.

Caption: Configure Cloudflare Tunnel

  1. Use the generated tunnel endpoint to access internal resources.

Caption: Access internal resource using Cloudflare Tunnel


Method 4: Configure Proxy (Charles Proxy, Burp Suite, Fiddler)

Use a proxy tool to route traffic to internal resources.

  1. Set up Charles Proxy, Burp Suite, or Fiddler on a machine with internal access.

Caption: Configure proxy tool

  1. Configure the TestGrid device to use the proxy.

Caption: Configure proxy on TestGrid device

  1. Ensure proxy rules allow access to internal resources.

Caption: Verify proxy rules


Method 5: WebView or Custom Browser Testing

  1. Modify the test script to load the internal URL using WebView.

Example:

WebView myWebView = findViewById(R.id.webview); myWebView.loadUrl("http://internal.example.com");

Caption: Load internal URL using WebView

  1. Use a browser that supports custom proxy settings if the default browser is restricted.

Caption: Configure browser access for internal URLs


Method 6: Firewall Whitelisting & Static IP Access

  1. Whitelist the TestGrid device static IP in firewall settings.

Caption: Configure firewall whitelist

  1. Ensure firewall rules allow traffic from TestGrid to the internal service.

Caption: Verify firewall access rules


Method 7: VPN Configuration for TestGrid Server

If the TestGrid server is not within the same network as the internal resource:

  1. Connect the TestGrid server to a VPN that provides access to the internal URL.

Caption: Configure VPN access on TestGrid server

  1. Ensure connected devices inherit network settings from the server.

Caption: Verify inherited network access


Verification Steps

Ping Test

Verify connectivity to the internal URL:

ping internal.example.com

Caption: Verify connectivity using ping


Browser Test

Open the internal URL in a mobile browser on the TestGrid device.

Caption: Verify internal URL access in browser


Automation Test

Run a test case that accesses the internal resource and verify successful execution.

Caption: Verify automation access to internal URL


Log Analysis

Review logs from TestGrid or proxy tools for connection failures.

Caption: Review logs for connectivity issues


Troubleshooting

IssuePossible CauseResolution
URL not loadingIncorrect network settingsVerify VPN, proxy, or DNS settings
Cannot modify hosts fileDevice is not rootedUse a proxy or tunneling solution
Firewall blocking accessIP is not whitelistedRequest firewall changes
Proxy not workingMisconfigured settingsReconfigure proxy and restart the device


Outcome

After completing these configurations:

  • Internal URLs can be accessed successfully from TestGrid devices.

  • Internal applications and services can be tested within the on-premise environment.

  • Connectivity can be configured based on infrastructure and security requirements.


Still have a question?

Support Contact:
support@testgrid.io

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article