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:
Modify the
/etc/hostsfile 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
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
Install ngrok.
Caption: Install ngrok
Expose the internal service using the following command:
ngrok http 8080
Caption: Start ngrok tunnel
Use the generated public URL to access the internal service.
Caption: Access internal service using generated URL
Cloudflare Tunnel
Configure a tunnel using
cloudflared.
Caption: Configure Cloudflare Tunnel
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.
Set up Charles Proxy, Burp Suite, or Fiddler on a machine with internal access.
Caption: Configure proxy tool
Configure the TestGrid device to use the proxy.
Caption: Configure proxy on TestGrid device
Ensure proxy rules allow access to internal resources.
Caption: Verify proxy rules
Method 5: WebView or Custom Browser Testing
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
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
Whitelist the TestGrid device static IP in firewall settings.
Caption: Configure firewall whitelist
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:
Connect the TestGrid server to a VPN that provides access to the internal URL.
Caption: Configure VPN access on TestGrid server
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
| Issue | Possible Cause | Resolution |
|---|---|---|
| URL not loading | Incorrect network settings | Verify VPN, proxy, or DNS settings |
| Cannot modify hosts file | Device is not rooted | Use a proxy or tunneling solution |
| Firewall blocking access | IP is not whitelisted | Request firewall changes |
| Proxy not working | Misconfigured settings | Reconfigure 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
Feedback sent
We appreciate your effort and will try to fix the article