node package manager

soysauce

Soysauce NPM version Build Status Coverage Status

Pretty sauceLabs browser matrix widget

Sauce Test Status

API

  • http://soysauce.berabou.me/u/saucelabs_username.svg
  • http://soysauce.berabou.me/u/saucelabs_username/session_name.svg

Can be render if available https://saucelabs.com/rest/v1/saucelabs_username/jobs

Provide widgets at your Express4

$ npm install express soysauce
$ node app.js
# Server running at http://localhost:59798/

app.js

// Dependencies 
var express= require('express');
var soysauce= require('soysauce');
 
// Setup express 
var app= express();
app.use(soysauce.middleware({datauri:true}));
app.listen(59798,function(){
  console.log('Server running at http://localhost:59798/');
});

Can be render at:

Middleware options

datauri: default true

Replace the url of image to datauri for avoid Mixed Content.

// Not use datauri 
app.use(soysauce.middleware());
app.listen(59798,function(){
  // ... 
  // <image x="7" y="2" width="21" height="21" xlink:href="http://localhost:59798/59798/chrome_64x64.png" /> 
  // ... 
});
 
// Use datauri 
app.use(soysauce.middleware({datauri:true}));
app.listen(59799,function(){
  // ... 
  // <image x="7" y="2" width="21" height="21" xlink:href=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAYjElEQVR4Ab2ZC5RdZZXnf/v7zn3XK6lUVV6VFyQQDRAgRGzAICDEKGLDIALSPhGlm/Ex3a09ziBjtw8UQdT2bfsYHEQcp0UcBGlQgmLkTSBASEJC3lVJveu+zvm+PeW996zcOmtCKoD+19q1v3uqslb+//3fe..." /> 
  // ... 
});

cache: default true

Cache the rendered svg. Update the cache if the jobs have been added.

CLI

soysauce url > widget.svg

Render a <svg> to stdout If url is jobs.json.

$ npm install soysauce --global
$ soysauce "https://saucelabs.com/rest/v1/59798/jobs?name=object-parser&full=true&limit=50" > widget.svg

Relevant project

multi-framework javascript browser testing

Launch any browser on SauceLabs at concurrency.

License

MIT