Using LambdaTest Tunnel with SmartUI SDK
LambdaTest Tunnel allows you to test your internal, development, or staging environments securely using SmartUI SDK. This guide explains how to configure and use LambdaTest Tunnel with SmartUI SDK.
Tunnel configuration is only supported with the exec
mode of SmartUI SDK. It is not compatible with capture
, upload
, or figma
commands. For more information about exec mode, refer to our SmartUI CLI Exec documentation.
Prerequisites
- The tunnel should be started by the same user who created the SmartUI project
- The tunnel must remain active throughout the entire SmartUI execution steps, from authentication to build completion
Configuration
To enable tunnel testing with SmartUI SDK, add the following configuration to your .smartui.json
file:
{
"tunnel": true,
"tunnelName": "my-tunnel"
}
Configuration Parameters
- tunnel: Set to
true
to enable tunnel testing - tunnelName: Specify the name of your tunnel instance (must match the name used when starting the tunnel)
Setting Up LambdaTest Tunnel
-
Download and install LambdaTest Tunnel by following the instructions in our Tunnel documentation
-
Start the tunnel with a specific name:
./LT --user {user-name} --key {access-key} --tunnelName my-tunnel
- Wait for the "Tunnel is connected" message before running your SmartUI tests
- Ensure the tunnel remains active throughout your testing session
- The tunnel name in your configuration must match the
tunnelName
used when starting the tunnel - Only the user who created the SmartUI project can start and use the tunnel for testing
Example Usage
Here's a complete example of a SmartUI configuration file using tunnel:
{
"web": {
"browsers": ["chrome", "firefox"],
"viewports": [
[1920, 1080],
[1366, 768]
]
},
"tunnel": true,
"tunnelName": "my-tunnel",
"waitForTimeout": 1000
}
For more detailed information about LambdaTest Tunnel features and configurations, please refer to our Advanced Tunnel Features documentation.
When testing with tunnel, make sure to:
- Start the tunnel before running your tests
- Use the correct tunnel name in your configuration
- Keep the tunnel running until all tests are complete
- Use the same user credentials for both tunnel and SmartUI project