Node Roundup: browser-perf, node-modules, module.exports vs. exports

2014-06-04 00:00:00 +0100 by Alex R. Young


browser-perf (GitHub: axemclion / browser-perf, License: BSD-2 Clause, npm: browser-perf) by Parashuram Narasimhan is a Node-based browser performance testing tool. It collects various metrics from browsers and then displays graphs using the results.

It runs as a command-line script which allows you to specify which browsers you'd like to use:

browser-perf http://example.com --browsers=chrome,firefox --selenium=ondemand.saucelabs.com --username=username --accesskey=accesskey

There's also a Node API:

var browserPerf = require('browser-perf');
browserPerf('http://example.com/test', function(err, res) {
  // res - array of objects. Metrics for this URL
  if (err) {
    console.log('ERROR: ' + err);
  } else {
}, {
  selenium: 'http://localhost:4444/wd/hub',
  browsers: ['chrome', 'firefox']
  username: SAUCE_USERNAME

There's a [wiki page with more details](https://github.com/axemclion/browser-perf/wiki/Node-Module