saucelabs-buildstatus
v0.1.2
Published
Retrieve sauce labs build status with dual error-first callback and Promise API.
Downloads
4
Maintainers
Readme
saucelabs-buildstatus
Retrieve sauce labs build status with dual error-first callback and Promise API.
npm install saucelabs-buildstatus --save
npm stats
API Example
Build status 'passing'
var status = require('saucelabs-buildstatus')
// error-first callback API
status(process.env.SAUCE_USERNAME, function (error, response) {
console.log(response)
})
//=> { status: 'passing' }
// promise API
status(process.env.SAUCE_USERNAME)
.then(console.log)
.catch(console.error)
//=> { status: 'passing' }
Build status 'failed'
var status = require('saucelabs-buildstatus')
// error-first callback API
status(process.env.SAUCE_USERNAME, function (error, response) {
console.log(response)
})
//=> { status: 'failed' }
// promise API
status(process.env.SAUCE_USERNAME)
.then(console.log)
.catch(console.error)
//=> { status: 'failed' }
Build status 'unknown'
var status = require('saucelabs-buildstatus')
// error-first callback API
status(process.env.SAUCE_USERNAME, function (error, response) {
console.log(response)
})
//=> { status: 'unknown' }
// promise API
status(process.env.SAUCE_USERNAME)
.then(console.log)
.catch(console.error)
//=> { status: 'unknown' }
Error: Account not found
// error-first callback API
status('n0000000000000p', function (error, response) {
console.log(response)
})
//=> { status: 'error', error: 'Account not found' }
// promise API
status('n0000000000000p')
.then(console.log)
.catch(console.error)
//=> { status: 'error', error: 'Account not found' }
API
status(sauceUsername)
arguments
sauceUsername (String)
Saucelabs user/project name.
returns
(Object)
Status object.
Reference
- Using Status Badges and the Browser Matrix Widget to Monitor Test Results
- Free unlimited testing for open source projects
Related
Contributing
SEE: contributing.md