LambdaTest Service
wdio-lambdatest-service is a 3rd party package, for more information please see GitHub | npm
A WebdriverIO service that manages tunnel and job metadata for LambdaTest users.
Installation
npm i wdio-lambdatest-service --save-dev
Instructions on how to install WebdriverIO
can be found here.
Configuration
WebdriverIO has LambdaTest support out of the box. You should simply set user
and key
in your wdio.conf.js
file. To enable the feature for app automation, set product: 'appAutomation'
in your wdio.conf.js
file. This service plugin provides supports for LambdaTest Tunnel. Set tunnel: true
also to activate this feature.
// wdio.conf.js
exports.config = {
// ...
user: process.env.LT_USERNAME,
key: process.env.LT_ACCESS_KEY,
logFile : './logDir/api.log',
product : 'appAutomation',
services: [
['lambdatest', {
tunnel: true
}]
],
// ...
};
To get test error remarks on automation dashboard
To get test error remarks on automation dashboard, simply add ltErrorRemark: true
in your wdio.conf.js
.
To upload app from local or url
Upload android
or ios
apps from local or hosted app url by adding this required configuration in your wdio.conf.js
. To use the uploaded app for testing along in the same run set enableCapability = true
, this will set the app url value in the capabilities.
// wdio.conf.js
services: [
[
"lambdatest",
{
tunnel: true,
app_upload: true,
app:{
app_name : "xyz", //provide your desired app name
app_path : "/path/to/your/app/file", //provide the local app location
// or
app_url : "https://example.test_android.apk", //provide the url where your app is horsted or stored
custom_id : "12345", //provide your desired custom id
enableCapability : true
}
}
]
]
Options
In order to authorize to the LambdaTest service your config needs to contain a user
and key
option.
tunnel
Set this to true to enable routing connections from LambdaTest cloud through your computer. You will also need to set tunnel
to true in browser capabilities.
Type: Boolean
Default: false
lambdatestOpts
Specified optional will be passed down to LambdaTest Tunnel.
Type: Object
Default: {}
Given below is an comprehensive list of all options available:
tunnelName
Specifies the custom LambdaTest Tunnel name to be used.
Example:
{"tunnelName": "my_custom_tunnel"}
port
Port for LambdaTest Tunnel to activate.
Example:
{"port": 33000}
user
LambdaTest username.
Example:
{"user": "your_username"}
key
LambdaTest accessKey.
Example:
{"key": "your_access_key"}
verbose
Should every proxy request be logged to stdout.
Example:
{"verbose": true}
logFile
Location of the LambdaTest Tunnel log file.
Example:
{"logFile": "/path/to/log/file"}
config
Path of the config file to use. Example:
{"config": "/path/to/config/file"}
dir
Specify the local directory that will be served by a file server on Tunnel port.
Example:
{"dir": "/path/to/local/directory"}
proxyHost
Specifies the Tunnel proxy port hostname.
Example:
{"proxyHost": "proxy.example.com"}
proxyUser
Specifies the Tunnel proxy port username.
Example:
{"proxyUser": "your_proxy_username"}
proxyPass
Specifies the Tunnel proxy port password.
Example:
{"proxyPass": "your_proxy_password"}
proxyPort
Specifies the port number where Tunnel proxy will activate.
Example:
{"proxyPort": 8080}
egressOnly
Uses proxy settings only for outbound requests.
Example:
{"egressOnly": true}
ingressOnly
Routes only incoming traffic via the proxy specified.
Example:
{"ingressOnly": true}
pacfile
To use PAC (Proxy Auto-Configuration) in local testing, provide path of a PAC file.
Example:
{"pacfile": "/path/to/pacfile"}
loadBalanced
Activates Load Balancing for LambdaTest Tunnel.
Example:
{"loadBalanced": true}
mode
Specifies in which mode tunnel should run "ssh" or "ws". (default "ssh").
Example:
{"mode": "ssh"}
sshConnType
Specify type of ssh connection (over_22, over_443, over_ws). To use –sshConnType, specify ––mode ssh flag first.
Example:
{"sshConnType": "over_22"}
maxSSHConnections
Increase the SSH connection from Tunnel Client to Tunnel Server. Maximum allowed value is 30.
Example:
{"maxSSHConnections": 2}
sharedTunnel
Sharing Tunnel among team members.
Example:
{"sharedTunnel": true}