Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

silvenon/cbt-tunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CrossBrowserTesting Tunnel obsolete Build Status

Obsolete: CrossBrowserTesting released their own node module for opening a tunnel, cbt_tunnels, which makes this hacky wrapper obsolete.


Create a Local Connection for the CrossBrowserTesting app. This is a wrapper around cbttunnel.jar, it returns a promise so you can actually know when the connection has been established. The project is inspired by selenium-standalone.

Install

$ npm install --save cbt-tunnel

Usage

You can pass the authentication key as an option:

import cbtTunnel from 'cbt-tunnel';

cbtTunnel({
  authKey: '<your authkey>'
})
  .then(() => {
    // success
  }, () => {
    // error
  });

or an environment variable:

import cbtTunnel from 'cbt-tunnel';

process.env.CBT_AUTH_KEY = '<your authkey>'

cbtTunnel()
  .then(() => {
    // success
  }, () => {
    // error
  });

You can find out what your authentication key is by logging into CrossBrowserTesting, clicking "Account" in the navigation bar and choosing "Account" from the dropdown menu.

API

cbtTunnel([options])

options

authKey

Type: string

The authentication key for your CrossBrowserTesting account. It's required to provide it either via this option or the CBT_AUTH_KEY environment variable.

dir

Type: string

If you want to locally test static HTML pages (i.e. not using a local server), you can do so by specifying the path to that directory. More info.

proxy

Type: object

Uses your computer to connect to a remote proxy server via a public IP address and port number. More info.

proxy.ip

Type: string

proxy.port

Type: number

License

MIT © Matija Marohnić