Skip to main content

Tunnel Configuration in HyperExecute

You can configure a secure tunnel in HyperExecute to test applications that are:

  • Hosted locally on your system, or
  • Behind a private network/firewall.

Prerequisites

  • HyperExecute YAML file -> HyperExecute supports multiple ways of setting up tunnels directly from your YAML configuration. You can use any version of YAML to pass the Tunnel parameters.
  • HyperExecute CLI to trigger your tests.

Ways to Use Tunnel in HyperExecute

There are 3 main ways to use a tunnel in HyperExecute:

1. Simple tunnel Connection

Enable tunnel directly by setting the tunnel flag to true in your HyperExecute YAML file. The HyperExecute CLI will launch a tunnel as sub process for accessing your applications which are locally hosted or behind a firewall.

hyperexecute.yaml
tunnel: true

Recommended if you want to quickly enable tunnel access for locally hosted apps.

2. Using Existing tunnel

If you already have a running tunnel, you can reuse it by specifying its name to access your applications which are locally hosted or behind a firewall.

hyperexecute.yaml
tunnelNames: ["lambdatest_tunnel"]

Useful when running multiple jobs and you don’t want to spawn new tunnels each time.

3. Advanced tunnel Configurations

These are the parameters you can use to configure your tunnel settings when running it.

OptionsTypeDescription
argsList of stringsThe arguments to pass to your tunnel. For a list of arguments checkout our tunnel flags
preOnlyBooleanShould the tunnel be enabled for only the pre step. Default false.
postOnlyBooleanShould the tunnel be enabled for only the post step. Default false.
globalBooleanShould the tunnel be enabled for all the steps? Default true.
systemProxyBooleanShould the tunnel be OS system wide? Default false.
checkTunnelOnFailureBooleanCheck tunnel on failure adds a check on our system to check the tunnel connection if a test fails and the tunnel is set to true. This option will retry the test 2 times if tunnel connection is flaky.

HyperExecute now supports tunnel capabilities for Maestro tests running on both virtual devices and real devices using the Raw Framework configuration.

hyperexecute.yaml
tunnel: true

tunnelOpts:
global: true
Image

Clone a Repository via Tunnel

Cloning a repository using a tunnel can help secure the transfer of data between the repository and your local machine.

Private repositories are hosted on a private network or behind a firewall, and you need to access them from outside the network. By using a tunnel, you can create a secure connection to the private network and clone the repository as if you were within the network.

You can now clone all your public and private repositories from your Git provider via tunnel.

After specifying the details of your repository, you need to set the useInCodeSetUp flag to true as shown below.

sourcePayload:
platform: git
link: https://--------
ref: <your_branch_name>
accessToken: <your_personal_access_token>
commit: <optional>

tunnelOpts:
useInCodeSetUp: true
## this flag is mandatory to pass to enable cloning via tunnel

Troubleshooting

If you are unable to access a particular website via the Actions environment even after setting the tunnel: true in the YAML file then please execute the following curl command:

response=$(curl -o /dev/null -s -w "%{http_code}" https://www.lambdatest.com)

## You need to enter your website URL in place of LambdaTest URL

Now you need to check the response of the website by passing the command:

echo $response

The ideal expected response in 200.

If you have more questions, feel free to Chat with us.

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles