@kanhaiyalalsingh/tunnel
Nodejs bindings for Kanhaiya Tunnel
Last updated a year ago by kanhaiyalalsingh .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @kanhaiyalalsingh/tunnel 
SYNC missed versions from official npm registry.

Nodejs bindings for Tunnel.

Installation

npm install @kanhaiyalalsingh/tunnel

Example

var lambdaTunnel = require('@kanhaiyalalsingh/tunnel');

//creates an instance of Tunnel
var tunnelInstance = new lambdaTunnel();

// replace <lambdatest-user> with your user and <lambdatest-accesskey> with your key.
var tunnelArguments = { 'user': '<lambdatest-user>', 'key': '<lambdatest-accesskey>' };

// starts the Tunnl instance with the required arguments
tunnelInstance.start(tunnelArguments, function(e, status) {
  if(!e) {
    console.log("Started Tunnel " + status);
  }
  // check if Tunnel instance is running
  console.log(tunnelInstance.isRunning());
});

Arguments

Every modifier except key is optional. Visit LambdaTest local modifiers for an entire list of modifiers. Below are demonstration of some modifiers for your reference.

Enable Verbose Logging

lt_local_args = { 'key': '<lambdatest-accesskey>', 'verbose': 'true' }
or
lt_local_args = { 'key': '<lambdatest-accesskey>', 'v': 'true' }

Testing Local Folder

Populate the path of the local folder you want to test in your internal server as a value in the below modifier

lt_local_args = { 'key': '<lambdatest-accesskey>', 'f': '/my/awesome/folder'}

Force Start

For terminating all other local instances running on your LambdaTest account.

lt_local_args = { 'key': '<lambdatest-accesskey>', 'force': 'true' }

Only Automate

Use the below modifier if you wish to run only Automation testing, and abort Real-time testing and Screenshot testing.

lt_local_args = { 'key': '<lambdatest-accesskey>', 'onlyAutomate': 'true' }
or
lt_local_args = { 'key': '<lambdatest-accesskey>', 'onlyautomate': 'true' }

Force Local

Use the below modifier for routing all the traffic through your local machine.

lt_local_args = { 'key': '<lambdatest-accesskey>', 'forceLocal': 'true' }
or 
lt_local_args = { 'key': '<lambdatest-accesskey>', 'forcelocal': 'true' }

Proxy

If you wish to perform local testing using a proxy. proxyHost/proxyhost: Hostname/IP of proxy, this is a mandatory value. proxyPort/proxyport: Port for the proxy, by default it would consider 3128 if -proxyHost is used For Basic Authentication, we use the below proxy options: proxyUser/proxyuser: Username for connecting to proxy, mandatory value for using proxyPass proxyPass/proxypass: Password for the USERNAME option.

lt_local_args = { 'key': '<lambdatest-accesskey>', 'proxyHost': '127.0.0.1', 'proxyPort': '8000', 'proxyUser': 'user', 'proxyPass': 'password' }
or
bs_local_args = { 'key': '<lambdatest-accesskey>', 'proxyhost': '127.0.0.1', 'proxyport': '8000', 'proxyuser': 'user', 'proxypass': 'password' }

Local Identifier

This identifier should be populated with a unique value when performing several tests on your locally hosted files simultaneously.

lt_local_args = { 'key': '<lambdatest-accesskey>', 'localIdentifier': 'randomstring' }

Additional Arguments

Binary Path

Local wrappers at LambdaTest, by default, will download & execute the latest version of Lambda Tunnel binary file in ~/.lambdatest or the present working directory or the tmp folder by order. However, if you wish to override these,then you can do so by passing the -binarypath argument. Below is the path where you would have to specify your local binary path -

lt_local_args = { 'key': '<lambdatest-accesskey>', 'binarypath': '/lambdatest/LambdaTestLocal' }
or
lt_local_args = { 'key': '<lambdatest-accesskey>', 'binarypath': '/lambdatest/lambdatestlocal' }

Logfile

While executing the '-verbose' or '-v' argument, you can save the entire logs in a file. You can provide a specific path to this file. If you won't provide a path then the logs would be saved in your present working directory by the filename: local.log. For providing a specific path use the below argument:

lt_local_args = { 'key': '<lambdatest-accesskey>', 'verbose': 'true', 'logFile': '/lambdatest/logs.txt' }

Contribute

Reporting bugs

Our GitHub Issue Tracker will help you log bug reports.

Tips for submitting an issue: Keep in mind, you don't end up submitting two issues with the same information. Make sure you add a unique input in every issue that you submit. You could also provide a "+1" value in the comments.

Always provide the steps to reproduce before you submit a bug. Provide the environment details where you recieved the issue i.e. Browser Name, Browser Version, Operating System, Screen Resolution and more. Describe the situation that led to your encounter with bug. Describe the expected output, and the actual output precisely.

Pull Requests

We don't want to pull breaks in case you want to customize your LambdaTest experience. Before you proceed with implementing pull requests, keep in mind the following. Make sure you stick to coding conventions.Once you include tests, ensure that they all pass.Make sure to clean up your Git history, prior your submission of a pull-request. You can do so by using the interactive rebase command for committing and squashing, simultaneously with minor changes + fixes into the corresponding commits.

Current Tags

  • 1.1.4                                ...           latest (a year ago)

15 Versions

  • 1.1.4                                ...           a year ago
  • 1.1.3                                ...           a year ago
  • 1.1.2                                ...           a year ago
  • 1.1.1                                ...           a year ago
  • 1.1.0                                ...           a year ago
  • 1.0.9                                ...           a year ago
  • 1.0.8                                ...           a year ago
  • 1.0.7                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 15
This Month 15
Last Day 0
Last Week 0
Last Month 0
Dependencies (7)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |