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.
- Download and configure the Test Execution - Cloud Tunnel.
- Run tests with the Private/Local Testing option enabled.
Configure Test Execution - Cloud Tunnel​
- Make sure you have the Account Admin or System Admin role. Refer to this document for more details: Account level roles.
-
In TestOps, go to Admin Settings > System Configuration > Execution and select the Tunnel tab.
-
In the upper right corner, select Learn how to set up a Tunnel. This will open the set up dialog with instructions.
Follow the on-screen instructions:
- Select your OS, download the binary file, and unzip the file.
- Right-click on the file to open it in the terminal (for macOS), or open the file in cmd.exe (for Windows).
- Copy the command in the Generate configuration section, and open a Terminal or Command Prompt to run the command.
- Copy the command in the Start a tunnel section, and open a Terminal or Command Prompt to run the command.
You have successfully configured the TestCloud Tunnel.
-
To validate your Tunnel configuration, the Tunnel should be in Active status as shown below.
Create and run tests with Test Execution - Cloud tunnel​
-
Navigate to Executions and select + Create > Create Automated Test Run.
-
Specify the information and configuration for the test run. Refer to this guide for details instruction: Create automated test run.
-
In the Advanced Settings section, switch the Private/Local Testing toggle on.
- 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.
-
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)"`