node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey »

testdroid-client

testdroid-client

testdroid-client is a client library for interacting with the Bitbar testdroid cloud API.

Installation

$ npm install testdroid-client

Usage

Examples can be found here

Creating testdroid client instance

var Testdroid = require('testdroid-client');
 
var username = 'joe@example.com';
var password = '123456';
var cloudUrl = 'http://cloudurl/';
 
var client = new Testdroid(cloudUrl, username, password);

Listing all devices

client.getDevices().then(function(devices) {
    console.dir(getDevices);
});

Listing devices matching a particular name

 
var device;
client.getDeviceByName('t2m flame').then(function(deviceInfo) {
    device = deviceInfo;
});

Create device session

var session;
client.startDeviceSession(device.id).then(function(sessionInfo) {
    session = sessionInfo;
});

Create a proxy session for ADB

var adbProxy;
client.getProxy('adb', session.id).then(function(proxyInfo) {
    adbProxy = proxyInfo;
});