Skip to main content

Local testing with Test Execution - Cloud in TestOps

This document shows you how to set up Test Execution - Cloud Tunnel in TestOps and perform local testing.

If your application under test is locally hosted in a private network, you can set up a tunnel for Test Execution - Cloud server to access the application.

  1. Download and configure the Test Execution - Cloud Tunnel.
  2. Run tests with the Private/Local Testing option enabled.

Configure Test Execution - Cloud Tunnel​

Requirements
  • Make sure you have the Account Admin or System Admin role. Refer to this document for more details: Account level roles.
  1. In TestOps, go to Admin Settings > System Configuration > Execution and select the Tunnel tab.

     TestCloud tunnel page
  2. In the upper right corner, select Learn how to set up a Tunnel. This will open the set up dialog with instructions.

    Set up TestCloud tunnel

    Follow the on-screen instructions:

    1. Select your OS, download the binary file, and unzip the file.
    2. Right-click on the file to open it in the terminal (for macOS), or open the file in cmd.exe (for Windows).
    3. Copy the command in the Generate configuration section, and open a Terminal or Command Prompt to run the command.
    Configure TestCloud tunnel client
    1. Copy the command in the Start a tunnel section, and open a Terminal or Command Prompt to run the command.
    Start a tunnel

    You have successfully configured the TestCloud Tunnel.

  3. To validate your Tunnel configuration, the Tunnel should be in Active status as shown below.

    Validate TestCloud tunnel active

Create and run tests with Test Execution - Cloud tunnel​

  1. Navigate to Executions and select + Create > Create Automated Test Run.

    Create automated test run page
  2. Specify the information and configuration for the test run. Refer to this guide for details instruction: Create automated test run.

  3. In the Advanced Settings section, switch the Private/Local Testing toggle on.

    Advanced settings
    • Test Execution - Cloud Tunnel: You can choose a specific tunnel to execute the test or use Auto-selected tunnel. With the auto-select option, Test Execution - Cloud will use the most available tunnel, prioritizing private tunnels over shared tunnels. In case your tests also perform API calls, check the Also Include API Calls option.
    • Test Execution - Cloud IPs Whitelisting: Enable this option to whitelist Test Execution - Cloud’s infrastructure IP addresses and endpoints, allowing Test Execution - Cloud to securely access your Application Under Test (AUT) when it is hosted within a restricted or highly secure network. See the detailed list of required IPs and endpoints in Network configuration for Test Execution - Cloud.
  4. Once you're done, click Run Now to execute instantly or Schedule to create a recurring schedule for it.

Configure tunnelconfig file​

When you configure Test Execution - Cloud Tunnel with the /kt config command, the client produces the tunnelconfig file that stores settings information. You can edit this file to optimize tunnel traffic and configure proxy settings.

Optimizing traffic with allow_host​

By default, Test Execution - Cloud may route all browser traffic through the tunnel, including hosts outside your application under test (AUT). To reduce unnecessary traffic and improve performance, use the allow_hosts setting in tunnelconfig. This allows:

  • Requests whose hostname matches a pattern in allow_hosts are routed through the tunnel.
  • All other requests are served directly from Test Execution - Cloud infrastructure, bypassing the tunnel entirely.

Proxy settings​

If the tunnel client runs behind an HTTP/HTTPS proxy, configure the following settings:

  • proxy_host, proxy_port: Proxy address and port, e.g. localhost:9070.
  • proxy_username, proxy_password: Username and password.

Example code

allow_hosts = ['*.your-private-host.com', '*.another-private-host.com']
api_key = "54316023-e777-436a-xxxx-xxxxxxxxxxxx"
group = "0027a725-xxx-4d92-xxx-1e6534d7acd9"
inactive_tunnel_timeout = 0
organization_id = 704xxx
private_tunnel = false
proxy_host = "localhost:9070"
proxy_password = ""
proxy_port = ""
proxy_username = ""
retry = 3
server = "[https://tunnel-manager.katalon.com"{"\n"}team_id](https://tunnel-manager.katalon.com"{"%5Cn"}team_id/) = 644xxx
tenant = "TestOps"
username = "[john.doe@katalon.com](mailto:john.doe@katalon.com)"`
Was this page helpful?