Socket
Book a DemoInstallSign in
Socket

get-sauce-results

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-sauce-results

Download debugging information about a sauce labs job

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source
# get-sauce-results

Download debugging information about a sauce labs job

Build Status Dependency Status NPM version

Installation

$ npm install get-sauce-results

or

$ npm install get-sauce-results -g

Usage

Command Line

To download all of a jobs assets into the current directory simply run:

$ get-sauce-results user key jobID

Example:

$ get-sauce-results sauce-runner c71a5c75-7c28-483f-9053-56da13b40bc2 2f175cb6900a479a8ef45d13d2b14807
log.json
video.flv
selenium-server.log
0000screenshot.png
0001screenshot.png
0002screenshot.png
0003screenshot.png

API

All streams are node 0.10 or higher style streams (using readable-stream for backwards compatibility). They are also wrapped with the aditional barrage API which provides syphon, buffer and wait.

Basic Example:

var barrage = require('barrage')
var fs = require('fs')
var getResults = require('get-sauce-results')

function download(user, key, job, destinationFolder) {
  var source = getResults(user, key, job)
  var dest = new barrage.Writable({objectMode: true})
  dest._write = function (entry, _, callback) {
    entry.read()
         .syphon(barrage(fs.createWriteStream(path.join(destinationFolder, entry.path))))
         .wait(callback)
  }
  source.syphon(dest)
  return dest.wait(callback)
}

getSauceResults(user, key, job) => stream

Returns a stream of objects, each with a path property which contains the file name of the asset and a read method, which returns a stream for the binary data of the file.

getSauceResults.getAssets(user, key, job, callback(err, res))

Call the callback with an object mapping names onto assets

getSauceResults.getAsset(user, key, job, assetPath) => stream

Return a binary stream for a given asset.

FAQs

Package last updated on 07 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts