Skip to content
NodeJS module to communicate with the TestingBot API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.eslintrc.js
.gitignore
.travis.yml
Makefile
README.md
index.js
package.json

README.md

npm version npm downloads Build Status dependencies Status devDependencies Status

testingbot-api

Wrapper around the TestingBot REST API for Node.js.

Install

npm install testingbot-api

Credentials

You can use environment variables TESTINGBOT_KEY and TESTINGBOT_SECRET to pass your TestingBot key and secret to the API client. The key and secret can be obtained from TestingBot .

Using the wrapper

var TestingBot = require('testingbot-api');

var tb = new TestingBot({
  api_key: "your-tb-key",
  api_secret: "your-tb-secret"
});

getBrowsers

Gets a list of browsers you can test on

api.getBrowsers(function(error, browsers) {});

getUserInfo

Gets your user information

api.getUserInfo(function(error, userInfo) {});

getTests

Gets list of your latest tests

api.getTests(function(error, tests) {}, offset, limit);

getTestDetails

Gets details for a single test, pass the WebDriver's SessionID

api.getTestDetails(sessionId, function(error, testDetails) {});

updateTest

Updates a single test. For example, update the passed state of a test (whether it was successful or not).

var testData = { "test[success]" : "1", "test[status_message]" : "test" };
api.updateTest(testData, sessionId, function(error, testDetails) {});

deleteTest

Deletes a single test, pass the WebDriver's SessionID

api.deleteTest(sessionId, function(error, success) {});

stopTest

Stops a single test, pass the WebDriver's SessionID

api.stopTest(sessionId, function(error, success) {});

getTunnelList

Gets list of active tunnels

api.getTunnelList(function(error, tunnelList) {});

deleteTunnel

Deletes a single Tunnel

api.deleteTunnel(tunnelId, function(error, success) {});

getBuilds

Retrieves the latest builds

api.getBuilds(function(error, builds) {}, offset, limit);

getTestsForBuild

Retrieves the tests for a single build

api.getTestsForBuild(buildId, function(error, tests) {});

deleteBuild

Deletes a single build

api.deleteBuild(buildId, function(error, success) {});

uploadFile

Uploads a local file to TestingBot Storage

api.uploadFile(localFilePath, function(error, appUrl) {});

uploadRemoteFile

Uploads a remote file to TestingBot Storage

api.uploadFile(remoteFileUrl, function(error, appUrl) {});

getAuthenticationHashForSharing

Calculates the authentication hash for sharing, pass the WebDriver's SessionID. This is used to share a test's detail page on TestingBot

api.getAuthenticationHashForSharing(sessionId);

Tests

npm test

More documentation

Check out the TestingBot REST API for more information.

License

The MIT License (MIT)

Copyright (c) TestingBot.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You can’t perform that action at this time.